Search by

baljinnyamday / xyp-sdk

baljinnyamday

Typed PHP SDK for XYP (ХУР), Mongolia's government data exchange system

Package info

github.com/baljinnyamday/xyp-sdk

Homepage

Documentation

Language:Python

pkg:composer/baljinnyamday/xyp-sdk

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 5

v0.1.0-alpha.2 2026-09-22 23:16 UTC

This package is auto-updated.

Last update: 2026-09-22 23:19:11 UTC


README

PyPI npm Packagist python typescript go php

SDKs for XYP (ХУР), Mongolia's government data exchange system, generated from one description of the API so every language exposes the same services.

Language Package Status
Python packages/pythonpip install "xyp>=0.1.0a2" alpha
TypeScript / Node.js packages/typescriptnpm install xyp-sdk@alpha alpha
Go packages/gogo get github.com/baljinnyamday/xyp-sdk/packages/go@v0.1.0-alpha.1 alpha
PHP packages/phpcomposer require baljinnyamday/xyp-sdk:0.1.0-alpha.1 alpha
Java packages/java planned

Unofficial: this project is not affiliated with the National Data Center or E-Mongolia Academy.

How it fits together

spec/services.json   the service catalog, fetched from developer.xyp.gov.mn
spec/wsdl/*.wsdl     WSDLs we have copies of (authoritative for request types)
        │
generator/           spec -> clean, language-neutral model -> code per language
        │
packages/<language>  small hand-written core + generated models and services
  • Update the catalog: uv run spec/fetch_spec.py
  • Regenerate: cd generator && uv run xyp-generate
  • Never edit generated files (Python: operations/, services/, models/, _groups.py, _operations.py; TypeScript: src/operations/, src/services/, src/types/, src/groups.ts, src/registry.ts; Go: xyp/registry.go and every xyp/<group>/ package; PHP: src/Registry.php, src/ServiceGroups.php and every src/<Group>/ directory); change the generator or the spec.

XYP publishes SOAP WSDLs only inside its VPN, and its responses are typed xs:anyType, so the public portal catalog is the only description of what services return. That catalog is typed by hand and the generator's normalize.py documents every irregularity it has to clean up.

The PHP package's composer.json sits at the repository root, because Packagist only reads packages from there; .gitattributes keeps everything but packages/php/src and its certificates out of what composer require downloads.

See docs/tls.md for why the SDKs verify TLS against bundled national CA certificates instead of turning verification off.

License

MIT