{"_id":"@namegarage/sdk","_rev":"3-a14956d8cba48778a8bbc5aac5eee9b6","name":"@namegarage/sdk","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.0-stage":{"name":"@namegarage/sdk","version":"0.0.0-stage","_id":"@namegarage/sdk@0.0.0-stage","stub":true,"maintainers":[{"name":"nikolay","email":"nikolaynkolev@gmail.com"}],"dist":{"shasum":"6bc3788ff31e529cbed467301d3a8ae73e6b8985","tarball":"https://registry.npmjs.org/@namegarage/sdk/-/sdk-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-JwiKFW2AqnHcw1juxGVp00JSg2U7HC97+wX+O7289S9hUKO4guv+LrA8MtG2jYhvVHBYNFh2ktombSILAZteDg==","signatures":[{"sig":"MEQCIDwpugd+Yma+QEyydPCVWYGYtj7jgvfkack11rz+nvv0AiBYomwWvtaKDNSwVowkJqPfzlRYQLSGmHtBVnE5vkeHIg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":337},"_npmUser":{"name":"nikolay","email":"nikolaynkolev@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0":{"name":"@namegarage/sdk","version":"0.1.0","keywords":["namegarage","domains","domain-search","sdk","typescript"],"license":"MIT","_id":"@namegarage/sdk@0.1.0","maintainers":[{"name":"nikolay","email":"nikolaynkolev@gmail.com"}],"homepage":"https://namegarage.com/docs/","bugs":{"url":"https://github.com/namegarage/sdk/issues"},"dist":{"shasum":"3797c0730f7e2fc33825a852c26cf233ef5c42a3","tarball":"https://registry.npmjs.org/@namegarage/sdk/-/sdk-0.1.0.tgz","fileCount":10,"integrity":"sha512-JaPR/lmpPTKkTH9HwKP2Ny1WtNURW2LbBzGZsE9SJjGax4Br6tLJUJPCzgJGJ+UEo9gyqA9qPL4fnJq72Hfg6w==","signatures":[{"sig":"MEUCIFxAgq1vvPr0cFbu8EME+KqNhzOwxUsIfEEvffWR01cgAiEAyAmyDblcCCT6Muqli5M9+Xp5tYw3wm69HjN76NgnvgE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCnAdLlTP/K1j5LFXbIIEGnIA20ARajdrKNEKhcEkSEJAIgSSzPa4Jg+f229QSaAFso1LFH2EEPoXSXcOD6iZB/T4E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57061},"main":"./dist/index.cjs","type":"module","_from":"file:/private/tmp/namegarage-sdk/namegarage-sdk-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"node scripts/build.mjs","check":"tsc --noEmit","test:package":"node scripts/verify-package.mjs"},"_npmUser":{"name":"nikolay","email":"nikolaynkolev@gmail.com"},"_resolved":"/private/tmp/namegarage-sdk/namegarage-sdk-0.1.0.tgz","_integrity":"sha512-JaPR/lmpPTKkTH9HwKP2Ny1WtNURW2LbBzGZsE9SJjGax4Br6tLJUJPCzgJGJ+UEo9gyqA9qPL4fnJq72Hfg6w==","repository":{"url":"git+https://github.com/namegarage/sdk.git","type":"git"},"_npmVersion":"11.20.0","description":"Typed client for Namegarage public domain catalog and search APIs.","directories":{},"sideEffects":false,"_nodeVersion":"26.12.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"0.28.2","typescript":"7.0.2"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.1.0_1793036681410_0.39057775034230713","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"_id":"@namegarage/sdk@0.2.0","bugs":{"url":"https://github.com/namegarage/sdk/issues"},"dist":{"shasum":"cd7ae2c33a22ebbe1e5aac4fd6b2dd8c58cdf3b9","tarball":"https://registry.npmjs.org/@namegarage/sdk/-/sdk-0.2.0.tgz","fileCount":12,"integrity":"sha512-RQlsUew13B45xsQwmDbytwIQWYV0c2e2oFzUQB3P+NHIXpsxKEu8fdm8N3g+VrRV0Iw2H/96342thAlVvLoW3Q==","signatures":[{"sig":"MEYCIQCA2Op6c4tA2Ld8qinijiho/DDqZjkpi8yC1BB0Sp2+EgIhAPP93gUz3YlVVS6RfP8VGr0eAjfi1F6nbcgxxBf3WVVX","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIH7RtgP/yXyNGYUWb/lL+CuCFm+pRPtd70LyXyVuV4ssAiBGdAcPklH7e1Z6Yv27P/RClgMdMNnNDYIk66l8LkGJVg=="}],"unpackedSize":84082},"main":"./dist/index.cjs","name":"@namegarage/sdk","type":"module","_from":"file:/tmp/namegarage-coordinated-sdk/namegarage-sdk-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"license":"MIT","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"node scripts/build.mjs","check":"tsc --noEmit && npm run build && node scripts/check-release.mjs","test:aliases":"node scripts/verify-aliases.mjs","test:package":"node scripts/verify-package.mjs"},"version":"0.2.0","_npmUser":{"name":"nikolay","email":"nikolaynkolev@gmail.com"},"homepage":"https://namegarage.com/docs/","keywords":["namegarage","domains","domain-search","sdk","typescript"],"_resolved":"/tmp/namegarage-coordinated-sdk/namegarage-sdk-0.2.0.tgz","_integrity":"sha512-RQlsUew13B45xsQwmDbytwIQWYV0c2e2oFzUQB3P+NHIXpsxKEu8fdm8N3g+VrRV0Iw2H/96342thAlVvLoW3Q==","repository":{"url":"git+https://github.com/namegarage/sdk.git","type":"git"},"_npmVersion":"11.20.0","description":"Typed client for Namegarage public domain catalog and search APIs.","directories":{},"maintainers":[{"name":"nikolay","email":"nikolaynkolev@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.12.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"0.28.2","typescript":"7.0.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.2.0_1793125627652_0.45434412625505105"}}},"time":{"created":"2026-10-26T17:42:58.038Z","modified":"2026-10-27T18:27:07.934Z","0.0.0-stage":"2026-10-26T17:42:58.038Z","0.1.0":"2026-10-26T17:44:41.497Z","0.2.0":"2026-10-27T18:27:07.753Z"},"bugs":{"url":"https://github.com/namegarage/sdk/issues"},"license":"MIT","homepage":"https://namegarage.com/docs/","keywords":["namegarage","domains","domain-search","sdk","typescript"],"repository":{"url":"git+https://github.com/namegarage/sdk.git","type":"git"},"description":"Typed client for Namegarage public domain catalog and search APIs.","maintainers":[{"name":"nikolay","email":"nikolaynkolev@gmail.com"}],"readme":"# @namegarage/sdk\n\nTypeScript and JavaScript client for Namegarage's anonymous public domain catalog and search APIs. The package has no runtime dependencies. It supports ESM and CommonJS in Node.js and can be bundled for browsers.\n\n## Install\n\n```bash\nnpm install @namegarage/sdk@0.2.0\n```\n\nUse a runtime with native `fetch`, `AbortController`, `AbortSignal.any` and `DOMException`, such as Node.js 22 or later or a modern browser. You can supply your own `fetch` implementation.\n\n## Search for domains\n\n```ts\nimport { Namegarage } from '@namegarage/sdk';\n\nconst client = new Namegarage();\nconst matches = await client.searchDomains('meal-planning app', {\n  maxPrice: 5000,\n  limit: 3,\n});\n\nfor (const domain of matches.results) {\n  console.log(domain.name, domain.price_usd, domain.url);\n}\n```\n\nNo account, API key, bearer token or browser cookie is required. Requests omit credentials. The client only makes GET requests to the documented catalog, search, domain lookup, purchase-option and alternatives routes.\n\nSearch options are `maxPrice` (positive whole USD), `tier` (`Platinum`, `Gold`, `Silver`, `Bronze`, `Bargain`), `tld` (such as `com` or `co.uk`), `maxLength` (1–63), and `limit` (1–50). Responses retain the API's field names.\n\nA null `price_usd` means offer-only, never zero. `meaning: \"unavailable\"` can still include keyword matches. A result does not reserve a domain or guarantee later availability. Follow its returned URL to review the current purchase options.\n\n## Read the catalog\n\n```ts\nconst catalog = await client.getCatalog();\nconsole.log(catalog.count);\n```\n\nThe catalog is a published snapshot. Its `buy_now` field and promotion dates require interpretation; use search for prices resolved against current availability. The SDK does not calculate prices, start checkout, buy domains or manage accounts.\n\n## Handle refusals\n\n```ts\nimport { NamegarageApiError } from '@namegarage/sdk';\n\ntry {\n  await client.searchDomains('meal-planning app');\n} catch (error) {\n  if (error instanceof NamegarageApiError) {\n    console.error(error.status, error.code, error.retryAfterSeconds);\n  } else {\n    throw error;\n  }\n}\n```\n\nThe client never retries automatically. Honor `Retry-After` on HTTP 429 or 503. `NamegarageApiError` exposes `status`, `code`, `body`, the raw `retryAfter`, and parsed `retryAfterSeconds` (null when unavailable). Non-JSON edge refusals retain their HTTP status and text body.\n\nMalformed successful responses throw `NamegarageResponseError`. Native network errors, abort reasons and timeout errors propagate. You can cancel either method with `{ signal }`; the default timeout is 10 seconds and includes reading the response body.\n\n## Configure the client\n\n```ts\nconst client = new Namegarage({\n  timeoutMs: 15_000,\n  // baseUrl: 'http://127.0.0.1:8788', // Local fake-provider rehearsal.\n  // fetch: yourFetchImplementation,\n});\n```\n\n`baseUrl` accepts an HTTPS origin or an HTTP loopback origin, without a path, credentials, query or fragment. Configuration cannot select private API routes. Redirects are refused.\n\n## Develop and release\n\n```bash\nnpm ci --ignore-scripts\nnpm run check\nnpm test\nnpm run test:package\n```\n\nTests use synthetic `.invalid` domains and injected fetch implementations. Do not run acceptance examples against live search: it may call providers and spend the shared request allowance. Hosted acceptance must use Namegarage's verified signed operator rehearsal with fake providers and test markers.\n\nRelease from a clean, reviewed, signed commit. Inspect the package archive, install it into a clean temporary consumer, and test both entry points and declaration files before `npm publish --access public`. Keep hosted Actions disabled; local evidence and release records document what actually ran. npm provenance requires a supported hosted builder and is not claimed for a local release.\n\n[API documentation](https://namegarage.com/docs/) · [OpenAPI](https://namegarage.com/openapi.json) · [Source and issues](https://github.com/namegarage/sdk)\n\n## Compatibility package sources\n\n`aliases/namegarage` and `aliases/namegarage-sdk` contain thin compatibility\npackages pinned to the published `@namegarage/sdk@0.2.0`. New projects should use\nthe scoped package. Run `npm run test:aliases` to check their archives, clean\nconsumer installs, both module/type entry points and browser bundles.\n\n## License\n\nMIT. Copyright 2026 Namegarage.\n\n## Domain details, payment options and alternatives\n\n```ts\nconst domain = await client.getDomain('example.invalid');\nconst options = await client.getPurchaseOptions('example.invalid');\nconst alternatives = await client.suggestAlternatives('example.invalid', {\n  query: 'meal-planning app', maxPrice: 3000, limit: 5,\n});\n```\n\nThe `.invalid` name is fictional. `getDomain()` and `getPurchaseOptions()` return\n`{name, priced_at, found, domain}`; an absent listing is `found: false` with\n`domain: null`, not proof of registration availability. Published description\nand use-case fields are preserved when the server supplies them; do not invent\nwithheld copy. Alternatives exclude the reference before limiting and may use\nits first label when no project query is supplied.\n\nPayment values come from `domain.purchase_options`: USD outright price, lease\nprincipal and standard zero-down schedules. Compare monthly and final payments,\ntotal and extra cost versus cash. A cash-only discount may not reduce the lease\nprincipal. Null outright price means offer-only; an empty plan list means no\nstandard standalone plan is published. Follow the returned domain URL for current\nterms, other payment choices and additional checkout fees. These methods do not\ncreate quotes, holds, checkout sessions, messages, purchases or accounts.\n\nSearch descriptions are sent to Namegarage; omit confidential project details.\nAll methods support cancellation and the same timeout/refusal handling. The\n[developer changelog](https://namegarage.com/developers/changelog/) and bundled\n`release.json` record coordinated component versions.\n","readmeFilename":"README.md"}