{"_id":"@bariscemant/verimor","_rev":"5-999ad7afc2422b3a32f131ede75ccccb","name":"@bariscemant/verimor","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@bariscemant/verimor","version":"0.1.0","license":"MIT","_id":"@bariscemant/verimor@0.1.0","maintainers":[{"name":"bariscemant","email":"antbaris231@gmail.com"}],"homepage":"https://github.com/0Baris/verimor-sdk#readme","bugs":{"url":"https://github.com/0Baris/verimor-sdk/issues"},"dist":{"shasum":"2b06991608f6d17c20d6a69fd5827f3e9e787654","tarball":"https://registry.npmjs.org/@bariscemant/verimor/-/verimor-0.1.0.tgz","fileCount":35,"integrity":"sha512-dqWP+fmp85go9i8wBS9UAylaQoEpMlICyLDolIPoEbVTIzTZBpKYVvkb/Q7YpnN/4CaiUa0KgWlQRqEnNt9CZg==","signatures":[{"sig":"MEQCIHY3R5eeB7wAfF6i8CV4lpaFzUoZ9vwRbWn0xe4Ux8KRAiBgD+11RqyqS7X208pfOixZL29IqyMh4G4Wp1Nvfm6+9Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":367692},"type":"module","_from":"file:/tmp/verimor-npm-first-publish.YDG8XF/bariscemant-verimor-0.1.0.tgz","engines":{"node":">=22.14.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sms":{"types":"./dist/generated/sms.d.ts","import":"./dist/generated/sms.js"},"./switch":{"types":"./dist/generated/switch.d.ts","import":"./dist/generated/switch.js"},"./whatsapp":{"types":"./dist/generated/whatsapp.d.ts","import":"./dist/generated/whatsapp.js"}},"scripts":{"test":"vitest run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json","pack:dry":"npm pack --dry-run","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"bariscemant","email":"antbaris231@gmail.com"},"_resolved":"/tmp/verimor-npm-first-publish.YDG8XF/bariscemant-verimor-0.1.0.tgz","_integrity":"sha512-dqWP+fmp85go9i8wBS9UAylaQoEpMlICyLDolIPoEbVTIzTZBpKYVvkb/Q7YpnN/4CaiUa0KgWlQRqEnNt9CZg==","repository":{"url":"git+https://github.com/0Baris/verimor-sdk.git","type":"git"},"_npmVersion":"11.19.0","description":"Unofficial TypeScript SDK for Verimor APIs","directories":{},"sideEffects":false,"_nodeVersion":"26.8.1","dependencies":{"openapi-fetch":"0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"5.0.0","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/verimor_0.1.0_1789078083305_0.37353339508435557","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bariscemant/verimor","version":"0.1.1","license":"MIT","_id":"@bariscemant/verimor@0.1.1","maintainers":[{"name":"bariscemant","email":"antbaris231@gmail.com"}],"homepage":"https://github.com/0Baris/verimor-sdk#readme","bugs":{"url":"https://github.com/0Baris/verimor-sdk/issues"},"dist":{"shasum":"dd5aad9ecaa00e82774c9df82656fb5d727b3b02","tarball":"https://registry.npmjs.org/@bariscemant/verimor/-/verimor-0.1.1.tgz","fileCount":35,"integrity":"sha512-MOvS7UKyddnQ8pmVlwqUlfNpqnkDEI8St41whvzdKvQN+FPOe4Zp+9B0wtXxNa0hHg9kv+fdunQhBDPA5iq45g==","signatures":[{"sig":"MEUCIC1GUvij2wQIhQi/qdeQG1S6kys/bbIZXn00F4ETKdZUAiEAvoXgqqLsHRPF7rtoTWcJWjyTv4AW3CG9i88xdJqG1kY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bariscemant%2fverimor@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":373162},"type":"module","_from":"file:build/npm-artifact/bariscemant-verimor-0.1.1.tgz","engines":{"node":">=22.14.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sms":{"types":"./dist/generated/sms.d.ts","import":"./dist/generated/sms.js"},"./switch":{"types":"./dist/generated/switch.d.ts","import":"./dist/generated/switch.js"},"./whatsapp":{"types":"./dist/generated/whatsapp.d.ts","import":"./dist/generated/whatsapp.js"}},"scripts":{"test":"vitest run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json","pack:dry":"npm pack --dry-run","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:beb04337-1839-4a24-986b-ce0126507ddf"}},"_resolved":"/home/runner/work/verimor-sdk/verimor-sdk/build/npm-artifact/bariscemant-verimor-0.1.1.tgz","_integrity":"sha512-MOvS7UKyddnQ8pmVlwqUlfNpqnkDEI8St41whvzdKvQN+FPOe4Zp+9B0wtXxNa0hHg9kv+fdunQhBDPA5iq45g==","repository":{"url":"git+https://github.com/0Baris/verimor-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"Unofficial TypeScript SDK for Verimor APIs","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"openapi-fetch":"0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"5.0.0","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/verimor_0.1.1_1789296249537_0.9408731623256685","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bariscemant/verimor","version":"0.2.0","license":"MIT","_id":"@bariscemant/verimor@0.2.0","maintainers":[{"name":"bariscemant","email":"antbaris231@gmail.com"}],"homepage":"https://github.com/0Baris/verimor-sdk#readme","bugs":{"url":"https://github.com/0Baris/verimor-sdk/issues"},"dist":{"shasum":"50029e05bad935995e6d76057216a85cf2ec74bb","tarball":"https://registry.npmjs.org/@bariscemant/verimor/-/verimor-0.2.0.tgz","fileCount":47,"integrity":"sha512-4anOF9+U0DYKFwZyOaQtmmmGaF1kz+LVAxX+aQepy9elr4cmhP8bp3JgM7U9movz0HlrJh54XBsuB8J22jVZAQ==","signatures":[{"sig":"MEYCIQDTxDgcsAqoBxXg/y9dwmVct/OS4iL8okuBMS+9isI2DQIhAJMy240zwsvJTebYayziwThmIcv+n+eWfkxkozcSasim","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCOT+Y1Ea8GnXB5+QBhOCoWdO80LgSe8OI8iBBw+C0mqQIhAMtpLa8ZAAkzj6Vlc2eROaL/Cw+o67M5Bh9ZJdCqvycv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bariscemant%2fverimor@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":476584},"type":"module","_from":"file:build/npm-artifact/bariscemant-verimor-0.2.0.tgz","engines":{"node":">=22.14.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sms":{"types":"./dist/generated/sms.d.ts","import":"./dist/generated/sms.js"},"./switch":{"types":"./dist/generated/switch.d.ts","import":"./dist/generated/switch.js"},"./whatsapp":{"types":"./dist/generated/whatsapp.d.ts","import":"./dist/generated/whatsapp.js"}},"scripts":{"test":"vitest run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json","pack:dry":"npm pack --dry-run","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:beb04337-1839-4a24-986b-ce0126507ddf"}},"_resolved":"/home/runner/work/verimor-sdk/verimor-sdk/build/npm-artifact/bariscemant-verimor-0.2.0.tgz","_integrity":"sha512-4anOF9+U0DYKFwZyOaQtmmmGaF1kz+LVAxX+aQepy9elr4cmhP8bp3JgM7U9movz0HlrJh54XBsuB8J22jVZAQ==","repository":{"url":"git+https://github.com/0Baris/verimor-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"Unofficial TypeScript SDK for Verimor APIs","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"openapi-fetch":"0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"5.0.0","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/verimor_0.2.0_1789771311033_0.7131644902486678","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@bariscemant/verimor","version":"0.2.1","license":"MIT","_id":"@bariscemant/verimor@0.2.1","maintainers":[{"name":"bariscemant","email":"antbaris231@gmail.com"}],"homepage":"https://github.com/0Baris/verimor-sdk#readme","bugs":{"url":"https://github.com/0Baris/verimor-sdk/issues"},"dist":{"shasum":"ccc50aebca3425c734074ef3d5325bb9961648f1","tarball":"https://registry.npmjs.org/@bariscemant/verimor/-/verimor-0.2.1.tgz","fileCount":48,"integrity":"sha512-gFgAprWBWgRPyazDV7kiZa6k4xwpMME1B0XEsJvEeHlxIEieLiI9taWAqPtk9+9r40pMgH1utP14r8Dv44bkSQ==","signatures":[{"sig":"MEYCIQDe0NEkIN1X5I+aps/3XUNt0BP6cYyYMOQMARm/wtTWMQIhALvCpIO0jMmRLlh5gsDhILDUstuaGnUpTzmAvWjIQ+wt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIFqrqDdfZ6C243bowxSCwYMCMHrigy38n9SBR/z0OaChAiEAjixJHCaTVbrF97O93KEuM4PH05L25bWWDaCkLpP30nQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bariscemant%2fverimor@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":482947},"type":"module","_from":"file:build/npm-artifact/bariscemant-verimor-0.2.1.tgz","engines":{"node":">=22.14.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sms":{"types":"./dist/generated/sms.d.ts","import":"./dist/generated/sms.js"},"./switch":{"types":"./dist/generated/switch.d.ts","import":"./dist/generated/switch.js"},"./whatsapp":{"types":"./dist/generated/whatsapp.d.ts","import":"./dist/generated/whatsapp.js"}},"scripts":{"test":"vitest run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json","pack:dry":"npm pack --dry-run","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:beb04337-1839-4a24-986b-ce0126507ddf"}},"_resolved":"/home/runner/work/verimor-sdk/verimor-sdk/build/npm-artifact/bariscemant-verimor-0.2.1.tgz","_integrity":"sha512-gFgAprWBWgRPyazDV7kiZa6k4xwpMME1B0XEsJvEeHlxIEieLiI9taWAqPtk9+9r40pMgH1utP14r8Dv44bkSQ==","repository":{"url":"git+https://github.com/0Baris/verimor-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"Unofficial TypeScript SDK for Verimor APIs","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"openapi-fetch":"0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"5.0.0","typescript":"5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/verimor_0.2.1_1789808152972_0.46700406350872514","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"_id":"@bariscemant/verimor@0.2.2","bugs":{"url":"https://github.com/0Baris/verimor-sdk/issues"},"dist":{"shasum":"ed984c6d1156f2ec7b3c61577fc1b63f59cf9f56","tarball":"https://registry.npmjs.org/@bariscemant/verimor/-/verimor-0.2.2.tgz","fileCount":196,"integrity":"sha512-2njVDDzjpf2X2GoLr08QbiFesDwxXpLVbooU8OK7kFRI0NoOqQrtcBFr2MMYnRew852YBo+e4ImsSU9Lx+nOyw==","signatures":[{"sig":"MEQCIAUqo0rc8So5kTH8+TYVTTW0wEsLzA+u8KxVofCEYFDUAiBLOpR+YvRMa7hGyoXbsQEu+s781d3NHqsyzE1e2vBNiQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC/hZtN+7XJ6Wbba85S+r3rkZ2bPMwApaZdk7Sq/PYb1gIgZMobt/2xkDxfRKXhOH4opxb3AAih4Tm3jCnYyshSqDg="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bariscemant%2fverimor@0.2.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":520411},"name":"@bariscemant/verimor","type":"module","_from":"file:build/npm-artifact/bariscemant-verimor-0.2.2.tgz","engines":{"node":">=22.14.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./sms":{"types":"./dist/generated/sms.d.ts","import":"./dist/generated/sms.js"},"./switch":{"types":"./dist/generated/switch.d.ts","import":"./dist/generated/switch.js"},"./whatsapp":{"types":"./dist/generated/whatsapp.d.ts","import":"./dist/generated/whatsapp.js"}},"license":"MIT","scripts":{"test":"vitest run","build":"node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsc -p tsconfig.json","pack:dry":"npm pack --dry-run","typecheck":"tsc -p tsconfig.json --noEmit"},"version":"0.2.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:beb04337-1839-4a24-986b-ce0126507ddf"}},"homepage":"https://github.com/0Baris/verimor-sdk#readme","_resolved":"/home/runner/work/verimor-sdk/verimor-sdk/build/npm-artifact/bariscemant-verimor-0.2.2.tgz","_integrity":"sha512-2njVDDzjpf2X2GoLr08QbiFesDwxXpLVbooU8OK7kFRI0NoOqQrtcBFr2MMYnRew852YBo+e4ImsSU9Lx+nOyw==","repository":{"url":"git+https://github.com/0Baris/verimor-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"Unofficial TypeScript SDK for Verimor APIs","directories":{},"maintainers":[{"name":"bariscemant","email":"antbaris231@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.21.0","dependencies":{"openapi-fetch":"0.17.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"5.0.0","typescript":"5.9.3"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/verimor_0.2.2_1790335648657_0.8791197408166871"}}},"time":{"created":"2026-09-10T22:08:03.102Z","modified":"2026-09-25T11:27:29.077Z","0.1.0":"2026-09-10T22:08:03.447Z","0.1.1":"2026-09-13T10:44:09.693Z","0.2.0":"2026-09-18T22:41:51.147Z","0.2.1":"2026-09-19T08:55:53.066Z","0.2.2":"2026-09-25T11:27:28.730Z"},"bugs":{"url":"https://github.com/0Baris/verimor-sdk/issues"},"license":"MIT","homepage":"https://github.com/0Baris/verimor-sdk#readme","repository":{"url":"git+https://github.com/0Baris/verimor-sdk.git","type":"git"},"description":"Unofficial TypeScript SDK for Verimor APIs","maintainers":[{"name":"bariscemant","email":"antbaris231@gmail.com"}],"readme":"# `@bariscemant/verimor`\n\n[English documentation](#english-documentation)\n\nVerimor SMS, Switch ve WhatsApp API'leri için TypeScript SDK'sı. Paket ESM olarak\ndağıtılır, Node.js 22.14 ve üzerini destekler ve üç üründeki 68 operasyonun\ntamamını tip güvenli metotlarla sunar.\n\n> Bu bağımsız bir topluluk projesidir; Verimor tarafından geliştirilmez veya\n> desteklenmez. SDK kapsamlı offline ve localhost testlerinden geçmiştir ancak\n> henüz canlı Verimor hesaplarıyla doğrulanmamıştır.\n\n## Kurulum\n\n```bash\nnpm install @bariscemant/verimor\n```\n\nPaket yalnız ESM destekler.\n\n## SMS\n\n```ts\nimport { createSmsClient } from \"@bariscemant/verimor\";\n\nconst sms = createSmsClient({\n  username: process.env.VERIMOR_SMS_USERNAME!,\n  password: process.env.VERIMOR_SMS_PASSWORD!,\n  sourceAddr: \"VERIMOR\",\n});\n\nconst messageId = await sms.send({\n  messages: [{ dest: \"905001112233\", msg: \"Siparişiniz hazır.\" }],\n});\n\nconst balance = await sms.balance();\nconst status = await sms.status({ id: Number(messageId) });\nconsole.log({ messageId, balance, status });\n```\n\n`sourceAddr`, istemci seviyesindeki varsayılan SMS başlığıdır. Bir gönderimde\nfarklı başlık kullanmak için çağrı üzerinde `source_addr` verin:\n\n```ts\nawait sms.send({\n  source_addr: \"DIGERBASLIK\",\n  messages: [{ dest: \"905001112233\", msg: \"Merhaba\" }],\n});\n```\n\nÇağrıdaki `source_addr`, istemcideki `sourceAddr` değerinden önce gelir. Her iki\ndeğer de yoksa SDK ağ isteği oluşturmadan `TypeError` fırlatır. Gönderdiğiniz\nnesne değiştirilmez.\n\nDurum sorgusunda yalnız `id` veya yalnız `customId` kullanılmalıdır:\n\n```ts\nawait sms.status({ id: 12345 });\nawait sms.status({ customId: \"siparis-42\", dest: \"905001112233\" });\n```\n\nDiğer SMS operasyonları da aynı istemcidedir:\n\n```ts\nawait sms.listSenderIds();\nawait sms.listInboundMessages({ limit: 50 });\nawait sms.listBlacklistEntries({ offset: 0, limit: 100 });\n```\n\n## Switch\n\n```ts\nimport { createSwitchClient } from \"@bariscemant/verimor\";\n\nconst switchClient = createSwitchClient({\n  apiKey: process.env.VERIMOR_SWITCH_API_KEY!,\n});\n\nconst result = await switchClient.originate({\n  extension: \"100\",\n  destination: \"905001112233\",\n});\n\nconst extensions = await switchClient.listExtensions();\nconst queues = await switchClient.listQueues();\nconsole.log({ result, extensions, queues });\n```\n\nSwitch API anahtarı SDK tarafından `key` query parametresine eklenir. Çağrı,\nkuyruk, dahili, rehber, faks, kara liste ve raporlama operasyonları doğrudan\n`switchClient` üzerinde bulunur.\n\n## WhatsApp\n\n```ts\nimport { createWhatsAppClient } from \"@bariscemant/verimor\";\n\nconst whatsapp = createWhatsAppClient({\n  apiKey: process.env.VERIMOR_WHATSAPP_API_KEY!,\n});\n\nconst otp = await whatsapp.sendOtp({\n  to: \"905001112233\",\n  template_name: \"otp\",\n  language: \"tr\",\n  parameters: [\"482913\"],\n  use_tenant_queue: false,\n});\n\nconst utility = await whatsapp.sendUtility({\n  to: \"905001112233\",\n  template_name: \"siparis_hazir\",\n  language: \"tr\",\n  parameters: [\"ABC-42\"],\n  use_tenant_queue: false,\n});\n\nconst health = await whatsapp.health();\nconsole.log({ otp, utility, health });\n```\n\nWhatsApp API anahtarı her isteğe `x-api-key` header'ı olarak eklenir. Mesaj\nendpoint'lerinin başarılı `202` yanıtları normal başarı yanıtı olarak kabul edilir.\n\n## İstemci seçenekleri\n\n| Alan | Açıklama |\n| --- | --- |\n| `username`, `password` | SMS kimlik bilgileri; gereken endpoint'te body veya query alanına eklenir. |\n| `apiKey` | Switch için `key` query parametresi, WhatsApp için `x-api-key` header'ıdır. |\n| `sourceAddr` | SMS gönderimlerinde kullanılacak varsayılan başlık. |\n| `baseUrl` | Test, proxy veya farklı ortam için servis kök adresi. |\n| `timeoutMs` | İstek zaman aşımı; varsayılan `30_000` milisaniyedir. |\n| `fetch` | Test veya özel ağ katmanı için `fetch` uyumlu uygulama. |\n\n## Hata yönetimi\n\nConvenience ve façade metotları 2xx dışındaki HTTP yanıtlarında\n`VerimorApiError` fırlatır:\n\n```ts\nimport { VerimorApiError, createSmsClient } from \"@bariscemant/verimor\";\n\ntry {\n  await createSmsClient({ username: \"user\", password: \"secret\" }).balance();\n} catch (error) {\n  if (error instanceof VerimorApiError) {\n    console.error(error.product); // \"sms\"\n    console.error(error.status);  // ör. 401 veya 429\n    console.error(error.body);    // JSON, metin veya null\n  } else {\n    throw error;\n  }\n}\n```\n\n- Ağ, DNS ve bağlantı hataları native `fetch` hatası olarak kalır.\n- Timeout, `AbortSignal.timeout` kaynaklı native `TimeoutError`/fetch hata\n  zinciri üzerinden iletilir.\n- Bozuk veya beklenmeyen başarılı yanıtlar `TypeError` oluşturabilir.\n- SDK otomatik retry yapmaz ve rate limiter içermez.\n- SMS gönderimi, OTP ve çağrı başlatma gibi yan etkili işlemleri tekrar etmeden\n  önce ilk isteğin sunucuda işlenip işlenmediğini kontrol edin.\n\n## Façade ve `raw` arasındaki fark\n\nÜrün istemcisindeki doğrudan metotlar önerilen yüzeydir. Credentials ekleme,\nURL oluşturma, varsayılan timeout ve HTTP hata normalizasyonu bu katmandadır.\n\n`raw`, `openapi-fetch` tarafından sağlanan düşük seviyeli typed istemcidir:\n\n```ts\nconst response = await sms.raw.GET(\"/v2/headers\", {\n  params: {\n    query: {\n      username: process.env.VERIMOR_SMS_USERNAME!,\n      password: process.env.VERIMOR_SMS_PASSWORD!,\n    },\n  },\n});\n\nif (response.error) {\n  console.error(response.response.status, response.error);\n}\n```\n\n`raw` kullanımında endpoint parametreleri ve hata kontrolü size aittir. Generated\nOpenAPI tiplerine subpath export'larından erişebilirsiniz:\n\n```ts\nimport type { paths as SmsPaths } from \"@bariscemant/verimor/sms\";\nimport type { paths as SwitchPaths } from \"@bariscemant/verimor/switch\";\nimport type { paths as WhatsAppPaths } from \"@bariscemant/verimor/whatsapp\";\n```\n\n## Modüler generated tipler\n\nPaket içindeki `dist/generated/sms`, `switch` ve `whatsapp` declaration'ları\ntag bazında küçük modüllere ayrılır. Kaynak üretiminde hiçbir generated dosya\n**800 fiziksel satırı** geçmez; toplam generated kodun belirgin biçimde\nazalması beklenmez. Amaç daha okunabilir ve kararlı diff'lerdir.\n\nUyumluluk aggregator'ları korunduğu için yukarıdaki subpath import'ları ve\n`client.raw` tipleri değişmez. Generated dosyaları doğrudan düzenlemeyin;\nregeneration private generator otomasyonunda yapılır. Public export'u şu\nkomutlarla doğrulayın:\n\n```bash\nnpm run typecheck --workspace packages/typescript\nnpm test --workspace packages/typescript\nnpm run build --workspace packages/typescript\n```\n\n## Operasyon kapsamı ve üretim kullanımı\n\nSDK; SMS 13, Switch 52 ve WhatsApp 3 olmak üzere 68 OpenAPI operasyonunu kapsar.\nTam liste [`docs/operations.md`](https://github.com/0Baris/verimor-sdk/blob/main/docs/operations.md)\ndosyasındadır.\n\nCredentials'ı kaynak koda veya loglara yazmayın. Verimor hesabınızın rate limit\nve ücretlendirme koşullarını ayrıca doğrulayın. Bu sürüm canlı Verimor API'leriyle\ntest edilmediği için production öncesinde kendi hesabınızla kontrollü smoke test\nuygulayın.\n\n## English documentation\n\nUnofficial, community-maintained TypeScript SDK for the Verimor SMS, Switch and\nWhatsApp APIs. It is distributed as ESM, requires Node.js 22.14 or newer, and\nprovides typed first-class methods for all 68 documented operations.\n\n> This package is not developed or supported by Verimor. It has extensive\n> offline and localhost coverage, but it has not yet been verified against live\n> Verimor accounts.\n\n### Installation\n\n```bash\nnpm install @bariscemant/verimor\n```\n\n### SMS\n\n```ts\nimport { createSmsClient } from \"@bariscemant/verimor\";\n\nconst sms = createSmsClient({\n  username: process.env.VERIMOR_SMS_USERNAME!,\n  password: process.env.VERIMOR_SMS_PASSWORD!,\n  sourceAddr: \"VERIMOR\",\n});\n\nconst messageId = await sms.send({\n  messages: [{ dest: \"905001112233\", msg: \"Your order is ready.\" }],\n});\n\nconsole.log(await sms.balance());\nconsole.log(await sms.status({ id: Number(messageId) }));\nconsole.log(await sms.listSenderIds());\n```\n\n`sourceAddr` is the default sender header. A per-call `source_addr` overrides\nit. Exactly one of `id` and `customId` must be supplied to `status`.\n\n### Switch\n\n```ts\nimport { createSwitchClient } from \"@bariscemant/verimor\";\n\nconst switchClient = createSwitchClient({\n  apiKey: process.env.VERIMOR_SWITCH_API_KEY!,\n});\n\nawait switchClient.originate({ extension: \"100\", destination: \"905001112233\" });\nconsole.log(await switchClient.listExtensions());\nconsole.log(await switchClient.listQueues());\n```\n\nThe SDK injects the Switch API key as the `key` query parameter.\n\n### WhatsApp\n\n```ts\nimport { createWhatsAppClient } from \"@bariscemant/verimor\";\n\nconst whatsapp = createWhatsAppClient({\n  apiKey: process.env.VERIMOR_WHATSAPP_API_KEY!,\n});\n\nawait whatsapp.sendOtp({\n  to: \"905001112233\",\n  template_name: \"otp\",\n  language: \"en\",\n  parameters: [\"482913\"],\n  use_tenant_queue: false,\n});\nconsole.log(await whatsapp.health());\n```\n\nThe API key is injected as the `x-api-key` header. Successful `202` responses\nfrom message endpoints are treated as normal success responses.\n\n### Configuration, errors, and retries\n\nAll clients accept `baseUrl`, `timeoutMs`, and a custom `fetch` implementation.\nThe default timeout is 30 seconds. The SMS client additionally accepts\n`sourceAddr`.\n\nNon-2xx façade responses throw `VerimorApiError` with `product`, `status`, and\n`body` fields. Network errors remain native fetch errors. The SDK performs no\nautomatic retries and includes no rate limiter. Check whether a side-effecting\nrequest reached the service before retrying it yourself.\n\n### Low-level access\n\nUse first-class client methods for normal application code. Use `client.raw`\nwhen you need the underlying `openapi-fetch` response, headers, or generated\npath types. Raw calls do not receive the façade's credential injection or error\nnormalization automatically.\n\nThe complete operation table is available in\n[`docs/operations.md`](https://github.com/0Baris/verimor-sdk/blob/main/docs/operations.md).\n\nLicensed under MIT.\n","readmeFilename":"README.md"}