{"id":50822424,"url":"https://github.com/client-api/pmg-ts","last_synced_at":"2026-06-13T15:03:19.025Z","repository":{"id":359809929,"uuid":"1247559976","full_name":"client-api/pmg-ts","owner":"client-api","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-23T14:58:44.000Z","size":302,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T16:23:02.487Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/client-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-23T13:32:05.000Z","updated_at":"2026-05-23T14:58:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/client-api/pmg-ts","commit_stats":null,"previous_names":["client-api/pmg-ts"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/client-api/pmg-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/client-api","download_url":"https://codeload.github.com/client-api/pmg-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-ts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34288666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-13T15:03:18.243Z","updated_at":"2026-06-13T15:03:19.003Z","avatar_url":"https://github.com/client-api.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @clientapi/pmg\n\nTypeScript SDK for the Proxmox Mail Gateway API. Generated\nfrom the upstream `apidoc.js` from Proxmox Mail Gateway via [openapi-generator-cli][gen] with\ncustom Mustache template overrides.\n\n\u003e **Not an official Proxmox project.** Community SDK derived from the\n\u003e upstream `apidoc.js`. Always verify against the upstream API viewer.\n\u003e \u003chttps://pmg.proxmox.com/\u003e.\n\n## Install\n\n```bash\nnpm install @clientapi/pmg\n# or\npnpm add @clientapi/pmg\n```\n\n## Usage\n\n```ts\nimport { Configuration, Pmg } from '@clientapi/pmg';\n\nconst cfg = new Configuration({\n  basePath: 'https://pmg1.example.com:8006/api2/json',\n  apiKey: 'PMGAPIToken=user@realm!tokenid=uuid-secret',\n});\nconst pmg = new Pmg(cfg);\n\n// Per-tag accessors are lazily instantiated and share the same Configuration.\n// `removeOperationIdPrefix=true` strips the tag prefix from method names,\n// so the call is `pmg.qemu().vmStatus(...)`, not `qemuVmStatus(...)` —\n// you're already inside the `qemu` namespace.\nconst status = await pmg.qemu().vmStatus({ node: 'pmg1', vmid: 100 });\nconst nodes = await pmg.nodes().getNodes();\n```\n\nThe unified `Pmg` class wraps each per-tag API class\n(`QemuApi`, `LxcApi`, `ClusterApi`, `NodesApi`, …) so consumers don't\nneed to instantiate them individually.\n\n## Compound configs\n\nPVE encodes many fields as CLI-style shorthand strings\n(`net0=virtio,bridge=vmbr0,firewall=1`). Round-trip helpers are\nemitted for every compound config schema:\n\n```ts\nimport { PveQemuNetConfigToShorthand, PveQemuNetConfigFromShorthand } from '@clientapi/pmg';\n\nconst shorthand = PveQemuNetConfigToShorthand({\n  model: 'virtio',\n  bridge: 'vmbr0',\n  firewall: 1,\n});\n// → 'virtio,bridge=vmbr0,firewall=1'\n\nconst parsed = PveQemuNetConfigFromShorthand(shorthand);\n```\n\n## Indexed families\n\nNumbered properties (`net0..net31`, `mp0..mp255`, …) are exposed on\nevery model as a single collapsed `nets` / `mps` / … field:\n\n```ts\nconst req = {\n  nets: {\n    0: 'virtio,bridge=vmbr0',\n    3: 'e1000,bridge=vmbr1',\n  },\n};\n// Wire format: { net0: 'virtio,bridge=vmbr0', net3: 'e1000,bridge=vmbr1' }\n```\n\n## License\n\nApache 2.0 — see [LICENSE](./LICENSE).\n\n[gen]: https://openapi-generator.tech\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient-api%2Fpmg-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclient-api%2Fpmg-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient-api%2Fpmg-ts/lists"}