{"_id":"@altipla/website-contact","_rev":"2-a67e897af6a67fc25ca96f35e8dbb6f9","name":"@altipla/website-contact","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@altipla/website-contact","version":"0.1.0","author":"Altipla Consulting","license":"MIT","_id":"@altipla/website-contact@0.1.0","maintainers":[{"name":"ernestoalejo","email":"contact@ernestoalejo.me"}],"homepage":"https://github.com/altipla-consulting/website-contact","dist":{"shasum":"63742be0ab7e4afc6cabea8212127aee00790e7b","tarball":"https://registry.npmjs.org/@altipla/website-contact/-/website-contact-0.1.0.tgz","fileCount":8,"integrity":"sha512-SZnqjPAZRuUTFbRrPBImOmqtvrLUtP53t39zgIS0krxG5POJUOCcqFcNgpLVrL6LB4oYhpnzfrV0Y1ZiOboOmg==","signatures":[{"sig":"MEUCIGovTRh0TqdDfuO/nalgR4Zw4KadMzkzx/HmtNzCsye4AiEAmMYN+nGMrIRJNvYGOfGayznyDiTvSwGY6+KV6ak37Ks=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4585},"type":"module","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"scripts":{"fix":"oxlint --fix","lint":"tsc --noEmit && oxlint","test":"pnpm run lint","build":"obuild"},"_npmUser":{"name":"ernestoalejo","email":"contact@ernestoalejo.me"},"repository":{"url":"https://github.com/altipla-consulting/website-contact","type":"git"},"description":"Contact forms for our websites.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@bufbuild/protobuf":"^2.13.0","@connectrpc/connect":"^2.1.2","@connectrpc/connect-web":"^2.1.2","@buf/altipla_contacts.bufbuild_es":"2.13.0-20260811140100-7bcbbc699051.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"obuild":"^0.4.37","oxlint":"^1.57.0","prettier":"^3.8.1","typescript":"^6.0.3","@types/node":"^26.1.2","@vue/tsconfig":"^0.9.1","oxlint-tsgolint":"^0.23.0","@altipla/oxlint-config":"^0.1.6"},"_npmOperationalInternal":{"tmp":"tmp/website-contact_0.1.0_1786629140696_0.2815600873267128","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@altipla/website-contact","type":"module","version":"0.1.1","description":"Contact forms for our websites.","author":"Altipla Consulting","license":"MIT","repository":{"type":"git","url":"https://github.com/altipla-consulting/website-contact"},"homepage":"https://github.com/altipla-consulting/website-contact","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"}},"publishConfig":{"access":"public"},"dependencies":{"@buf/altipla_contacts.bufbuild_es":"2.13.0-20260811140100-7bcbbc699051.1","@bufbuild/protobuf":"^2.13.0","@connectrpc/connect":"^2.1.2","@connectrpc/connect-web":"^2.1.2"},"devDependencies":{"@altipla/oxlint-config":"^0.1.6","@types/node":"^26.1.2","@vue/tsconfig":"^0.9.1","obuild":"^0.4.37","oxlint":"^1.57.0","oxlint-tsgolint":"^0.23.0","prettier":"^3.8.1","typescript":"^6.0.3"},"scripts":{"build":"obuild","lint":"tsc --noEmit && oxlint","fix":"oxlint --fix","test":"pnpm run lint"},"_nodeVersion":"26.0.0","_id":"@altipla/website-contact@0.1.1","dist":{"integrity":"sha512-sB9lDg+M9viw9KlwYO3nw0h8WUONI1PeND872eoatUx91N7ixu7DhOLPK0FHIMYsiv+EMmfyq8yiehb9J0mGGw==","shasum":"227b7d5b347eb5e66a6d9b5fc37c49135b5db52e","tarball":"https://registry.npmjs.org/@altipla/website-contact/-/website-contact-0.1.1.tgz","fileCount":8,"unpackedSize":6001,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFsE82/ZMJSteIHhb3JbvrpyXyIreJk8Lzs8/v/leqWmAiBkDUE4A+a4Qhplm9zftgczVdvtLxgdnk+sIauyIGZH6A=="}]},"_npmUser":{"name":"ernestoalejo","email":"contact@ernestoalejo.me"},"directories":{},"maintainers":[{"name":"ernestoalejo","email":"contact@ernestoalejo.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/website-contact_0.1.1_1786706983804_0.9758402730297546"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T13:52:19.201Z","modified":"2026-08-14T11:29:44.264Z","0.1.0":"2026-08-13T13:52:20.854Z","0.1.1":"2026-08-14T11:29:43.979Z"},"author":"Altipla Consulting","license":"MIT","homepage":"https://github.com/altipla-consulting/website-contact","repository":{"type":"git","url":"https://github.com/altipla-consulting/website-contact"},"description":"Contact forms for our websites.","maintainers":[{"name":"ernestoalejo","email":"contact@ernestoalejo.me"}],"readme":"# website-contact\n\nContact forms for our websites.\n\n## Install\n\nBefore installing the package, create an `.npmrc` file in the project root with the following line:\n\n```ini\n@buf:registry=https://buf.build/gen/npm/v1/\n```\n\n## Usage\n\nConfigure the project once. The `project` value must match the name of the repository. The `token` value must be `CONTACTS_TOKEN` from `astro:env/server`.\n\n```ts\nimport { CONTACTS_TOKEN } from 'astro:env/server'\nimport { configureContact, sendContact } from '@altipla/website-contact'\n\nconfigureContact({\n  project: 'repository_name',\n  token: CONTACTS_TOKEN,\n})\n```\n\nOnce configured, use `sendContact` to submit the contact form data. Wrap the call and map failures to a generic form error.\n\nVercel always provides the client IP via `x-forwarded-for`:\n\n```ts\ntry {\n  await sendContact({\n    name: input.name,\n    email: input.email,\n    message: input.message,\n    ip: context.request.headers.get('x-forwarded-for')!,\n  })\n} catch {\n  throw new ActionError({\n    code: 'INTERNAL_SERVER_ERROR',\n    message: 'form.error.generic',\n  })\n}\n```\n","readmeFilename":""}