{"_id":"@architect-io/sdk","_rev":"8-30036dc1c5362493852a774cde9ebf57","name":"@architect-io/sdk","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@architect-io/sdk","version":"0.1.0","description":"Node.js SDK for Architect.io","main":"./dist/index.js","homepage":"https://github.com/architect-team/node-sdk","bugs":{"url":"https://github.com/architect-team/node-sdk/issues"},"repository":{"type":"git","url":"git+https://github.com/architect-team/node-sdk.git"},"scripts":{"build":"rm -rf ./dist/ && tsc","version":"npm run build && git add -A dist","postversion":"git push && git push --tags"},"keywords":["architect","microservices","deployment","node","sdk"],"author":{"name":"Architect.io"},"license":"GPL-3.0","devDependencies":{"@types/node":"^12.6.8","@types/protobufjs":"^6.0.0","grpc":"^1.22.2","protobufjs":"^6.8.8","ts-node":"^8.3.0","typescript":"^3.5.3"},"dependencies":{"axios":"^0.19.0"},"gitHead":"b8a3c6ad73e1062675ef190be2f705f6cfcb6cd6","_id":"@architect-io/sdk@0.1.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-quuuOGOCNbZWPAb+4b7JMBr7J/xLbp9J//30SHWfu2ITQcLW/FS1SV1OCEE/2L+DNyuKxkQgTcRnhx7/L0AQGQ==","shasum":"3387b8b5c2600e8bae077d21cc261fc051293087","tarball":"https://registry.npmjs.org/@architect-io/sdk/-/sdk-0.1.0.tgz","fileCount":29,"unpackedSize":33804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdN3jICRA9TVsSAnZWagAAtgMP/jA5xumIVt3MPHgDAR5C\nF9bPL0QMhyswltQjXDz5DdvLD7MhMWrE3QVB/YmK2pNWQ/89Odcvoq3sn2Bu\n01X6fqVGa9c12wu7cmmBbHA1q+XTPY+Og1neficLQSXVXb1pWHqjQxqdMBR9\nWr9NhmKjDrXTOz3YboC9wyUuCePNbXroY4O975mGj1u1ykhBwz4KgBIxZ46d\nHAC5bpfB6Lgea9TCi6zCSkvcoCPpmkx8Ia6ofXcSPqjcDx1ZCk7Io8mk2JC7\n1s1yAoUXTp5x8Z/OXqrkrn8SPLG4mBU/WzdDxAW9N19sQhZysr8NHhtGVk7+\nXzeC3AYYsSfU3NQEnL32H5KL6vL0oRDqtm9xutrAuUARYTTbD+1CHI8cHb+Z\n+nugWYMesOOuEr3dVgs754xy8nwMR2tVWUjSFUljEd4Z2P07KIPF87NvvBMx\nqsuudTnnOKwblVqXB3GojkHIF9U/GbmsuiMtteYBw5Cu/VM5ae3LZQn8R+Zo\nna/q+oc/fpVgmHhytCki3VFF287pNrWYUeAkHBrlKa8f404SSvDfeRTegOvp\nGeeqgyKxBVdveZeGnozxalkM/TfRXSoqACeKsqmRNWcBl4An3rxALSwg/yoD\nLgJ9px9APbCtx+mLhp81JOI1YYgemQoqASwl/FymKPQrYA4xWodQhOftaDNO\nwWy7\r\n=99rb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcmCfEdXXgFFjjUOrmHf6KvXnbLNA8IlRu69DkGC1sUwIgQc/DTUDITU8gR9Jf8ryX8Ign09lR0WpsDP9IKDgvbxk="}]},"maintainers":[{"name":"tjhiggins","email":"tj@architect.io"},{"name":"david.thor","email":"david.thor@arcussolutions.com"}],"_npmUser":{"name":"david.thor","email":"david.thor@arcussolutions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_0.1.0_1563916488097_0.9242718198777522"},"_hasShrinkwrap":false,"deprecated":"Critical bug fixed in 0.2.1 - removed hardcoded http references"},"0.1.1":{"name":"@architect-io/sdk","version":"0.1.1","description":"Node.js SDK for Architect.io","main":"./dist/index.js","homepage":"https://github.com/architect-team/node-sdk","bugs":{"url":"https://github.com/architect-team/node-sdk/issues"},"repository":{"type":"git","url":"git+https://github.com/architect-team/node-sdk.git"},"scripts":{"build":"rm -rf ./dist/ && tsc","version":"npm run build && git add -A dist","postversion":"git push && git push --tags"},"keywords":["architect","microservices","deployment","node","sdk"],"author":{"name":"Architect.io"},"license":"GPL-3.0","devDependencies":{"@types/node":"^12.6.8","@types/protobufjs":"^6.0.0","grpc":"^1.22.2","protobufjs":"^6.8.8","ts-node":"^8.3.0","typescript":"^3.5.3"},"dependencies":{"axios":"^0.19.0"},"gitHead":"bb30f3d584a96a123b90ce925a5db2ca1f0ba667","_id":"@architect-io/sdk@0.1.1","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-bNqAaA77DlYIqNhOoxH0v9CSJ0UNAv68oTf6I3jPc2qjit3fUeLp2j07hm4BcJ63RW0zr4emQU+OXI0042yHyA==","shasum":"fee2c66b868a5d9872370cdfbcc5166b00d8fa16","tarball":"https://registry.npmjs.org/@architect-io/sdk/-/sdk-0.1.1.tgz","fileCount":29,"unpackedSize":33808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOMENCRA9TVsSAnZWagAAKioP/jEVxLG9vOpBr1RGzC5I\nDYggiXDJt3L9ONXo/8Hgh7MZlive+w3xdJx6aGIsXGbDFNwiybzVpCg/8wPS\n66MLwAQQgRcXXKYh9RnpIEcNfphSt2Bz+Apb444S/5I9VI2MLXF6yahCWVpr\nDAvztSmnOqmhwLB0p4MSn+Tykr3oG2BSN5XVeVBxNJPvKNQ3HyW9Q2E4BPgz\nKzRRpbtnZ4lcQ4Q/GCoPWojurmyebDdr93h0+wNfe5OQx27AzcfBzuvJFVDE\npiStTkHe3iygty+u6ELtgPzpkDz8YNCQaMhsYd/yDDVRrFOdvIRTbNDuL3+i\nbE3ynes51gWSMMEQ9gYJsfhIDPRncHOSGAexAzdCoC+dri35DIGAIQ71YL+q\nz6fhoewIBvzHGafS9pFIs1oRq016fYCPA5iqFUnfWvnIxv+XX7Jdw3M9Nfoi\n8zmsV+k3ZVuSd5wV3M71u5L/gxqngZQWZ8bqs1llYVWoiYS2oHjvUIr+Jlr7\n1KZR3H7oUg4pmGSWO64Pnhip+mMdU4xDU1o2aRINSqGzDknu9sdVcvsl69Jw\njjuCEzZbUGn2tgAEFUetKkXSgp+LxQzMkMGw8bWlbrzQ3nNhfffntRX6HYaM\niMew6UJ6o82rODWRvoNthMX0KhmDl/yVeRm7DkqDFzGY0TixJn4pZmcVcFLB\nxTnd\r\n=Xpmz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhk8ojrlZRVpB1tggNBV/Nh7jOAINxeNBa17cPX/p5uAiBkxqxKn2nLI4sFW4lBhZaBEz0eDjrBw7q/2ZbBgMp76g=="}]},"maintainers":[{"name":"david.thor","email":"david.thor@arcussolutions.com"},{"name":"tjhiggins","email":"tj@architect.io"}],"_npmUser":{"name":"david.thor","email":"david.thor@arcussolutions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_0.1.1_1564000525016_0.4967328003530824"},"_hasShrinkwrap":false,"deprecated":"Critical bug fixed in 0.2.1 - removed hardcoded http references"},"0.2.0":{"name":"@architect-io/sdk","version":"0.2.0","description":"Node.js SDK for Architect.io","main":"./dist/index.js","homepage":"https://github.com/architect-team/node-sdk","bugs":{"url":"https://github.com/architect-team/node-sdk/issues"},"repository":{"type":"git","url":"git+https://github.com/architect-team/node-sdk.git"},"scripts":{"build":"rm -rf ./dist/ && tsc","version":"npm run build && git add -A dist","postversion":"git push && git push --tags"},"keywords":["architect","microservices","deployment","node","sdk"],"author":{"name":"Architect.io"},"license":"GPL-3.0","devDependencies":{"@types/node":"^12.6.8","@types/protobufjs":"^6.0.0","grpc":"^1.22.2","protobufjs":"^6.8.8","ts-node":"^8.3.0","typescript":"^3.5.3"},"dependencies":{"axios":"^0.19.0"},"gitHead":"81e84b90efeea5c5990d0bd275fb6e7ceef012fb","_id":"@architect-io/sdk@0.2.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-RmoJ0Ly/UonMcy1SH+eH4zcGzy9QXkqRzvI5xFrv4KkhFQi1VDpam/NQPIIx4aZJjHA/Rmz1KUBE7RZpA2FRFg==","shasum":"2c924b98b284de5b55745b395d1a3a2a3fbd0090","tarball":"https://registry.npmjs.org/@architect-io/sdk/-/sdk-0.2.0.tgz","fileCount":29,"unpackedSize":39975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdRF+8CRA9TVsSAnZWagAAPeQP/3MReW3JiteWhUcYAD6w\niAiU3M/IPwvMem6dl1iQs8Xnp5FJhsLTdPvqSUPtHQfQ4H5WbX3ZkhPYaP2X\nDbcaKFBzqLdGHahQN1NnYLxYBKfQT56F7OtZZGSv9tgo2lm+Yr1mtaZq2pwt\nQ+uImrUVAXM5767xe+qgssKhhSj1OD4OKHsj/gWSA/P/goWIecSMKPrO7mCX\nknDQEhmkoqA22KxZFXFeRG2XKJYWz2L1nPdPbSe2wDv2XGcm9juP4LrxcWNl\nQGFB1UvxbUAVjqFplZZNb92i3z/r00mvYgc2qkFBoGnTjmc8CTO1VPE8m3iq\n5Y7e7F3ubRphM3zBRVcN/m6tBnhhsIFZKJ8urGpbBukJzA7Oe2D0Xp4JGR7b\nVxFgnOoYYDMivuaan1KwN7I+13UiByC1M9WDyfQ+UOgUgbz1blVCLt8v8mMa\nwx60Fl7RCWn7KHK3syZwmji5PGczhWu7jK6G9DsWSoLg8SUFB6bbTxydjWJG\n/Uke/CYvUu23rWnqwIM6beGxX+xhXcplKlUo8Irth9ea3rVrHkaHUkE2knCA\n88w1CEwE8BnF/k9ucIvIUXvW2xHcNU4jWVP/2J/xMe2ZfCAGkGIif2/4JAsS\nfs0gP7a4ZEnsEaeH9CnYMVS5HPRIFVxrBS6Gw2rk34VH5MEHoT3U+5Qyv8zc\nqJwW\r\n=jsJW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFDPl4VYIBpo3bPxNlYMCDQnKDIsOTSY4c9h8mDQXlFQAiAWJo+6RWZrmXQLbACBcVeDg29L753xSNiSwFcUn1bSgw=="}]},"maintainers":[{"name":"david.thor","email":"david.thor@arcussolutions.com"},{"name":"tjhiggins","email":"tj@architect.io"}],"_npmUser":{"name":"david.thor","email":"david.thor@arcussolutions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_0.2.0_1564762043779_0.9556506344911346"},"_hasShrinkwrap":false,"deprecated":"Critical bug fixed in 0.2.1 - removed hardcoded http references"},"0.2.1":{"name":"@architect-io/sdk","version":"0.2.1","description":"Node.js SDK for Architect.io","main":"./dist/index.js","homepage":"https://github.com/architect-team/node-sdk","bugs":{"url":"https://github.com/architect-team/node-sdk/issues"},"repository":{"type":"git","url":"git+https://github.com/architect-team/node-sdk.git"},"scripts":{"build":"rm -rf ./dist/ && tsc","version":"npm run build && git add -A dist","postversion":"git push && git push --tags"},"keywords":["architect","microservices","deployment","node","sdk"],"author":{"name":"Architect.io"},"license":"GPL-3.0","devDependencies":{"@types/node":"^12.6.8","@types/protobufjs":"^6.0.0","grpc":"^1.22.2","protobufjs":"^6.8.8","ts-node":"^8.3.0","typescript":"^3.5.3"},"dependencies":{"axios":"^0.19.0"},"gitHead":"d4565afd1358fa700544cb646432e25f10a613e4","_id":"@architect-io/sdk@0.2.1","_nodeVersion":"12.8.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-/ve/TZpHH4GV5t3JCJZwxqLBgd6vQcRMiVE0N7M023eJ77uKKT7fDvEm1m9Ja29vAsPc+p7zCsr5qUangrnAaQ==","shasum":"bff9a29a41385913cc4ceafcf1bec40e8aa25203","tarball":"https://registry.npmjs.org/@architect-io/sdk/-/sdk-0.2.1.tgz","fileCount":29,"unpackedSize":44541,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUW8mCRA9TVsSAnZWagAAaRoQAIhq69bQwf9nn6TOaBJO\n2owUjl6K+dDYdCSUmXrq4y2xNkpH5p00eaWQBjBDDJ1o/JYEUSoUFlVPkOjK\nECPMjMIHpaUZjdLMf5dYrhrqXa+R+OuwgNK3IBJ0QPgv5iZJeC6Ye1C1jeC/\nQ13i9dhxppXEUZQHPIcNnIUcl0tj1iv+aAaYkBbC2qjsNnGphj0OkVbDTnO5\nMei6/WAdFAsgKlg7wP7nxoDpIQkWORezHBlME1teDjDrlPqCI9pZmKgvfS4j\nQhRg38x4Kuz9j9vi9l4YhZdPbPUshLD5gawNDfw24Y6hLQyrHh6yoramFgPP\n2mLLsVsGbEuhbzmKDe2M3rYFDZURIn9W7c0ohgMbx0E7GKk2KjWQKzH2iBaY\nfObbryQcuN1+uaAs31OD1IvG3gEv5t1X3Tam9cQJNrvGjIuihad5sigy5XT1\ne4bv9anYUMCNO5GIKCPoGOm6S8oGAE0OWz5PMU4WUL99CFbZUnsdtDMCDZAL\nMz0C0hgVJ2EMvkdv6y8UbLSVBefpcw62ilLfgTyvuES6YwShPS7e99d1qXKW\nJ4fVNmdNuyrK5AR59GRaq4AGWYwyZRpJAgWP8U/b00sVgL+xawALzfqXA3+L\nTjsblzE1lgXtSDmUIRU9OH98s3EtbCtVNcT2R7U0ORYkzzkbl8NX1hJveUOb\nQzdj\r\n=Ncd0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeumEFCOLVsBqLGGznSP0RfXz6K2v0LSMJdb+InVoOKgIhANOyTCAZoiCRD50M23VCqVNL2GfFQscTqZbaM9pNiIfO"}]},"maintainers":[{"name":"david.thor","email":"david.thor@arcussolutions.com"},{"name":"tjhiggins","email":"tj@architect.io"}],"_npmUser":{"name":"david.thor","email":"david.thor@arcussolutions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_0.2.1_1565617957696_0.1606967496069136"},"_hasShrinkwrap":false},"0.2.2":{"name":"@architect-io/sdk","version":"0.2.2","description":"Node.js SDK for Architect.io","main":"./dist/index.js","homepage":"https://github.com/architect-team/node-sdk","bugs":{"url":"https://github.com/architect-team/node-sdk/issues"},"repository":{"type":"git","url":"git+https://github.com/architect-team/node-sdk.git"},"scripts":{"build":"rm -rf ./dist/ && tsc","version":"npm run build && git add -A dist","postversion":"git push && git push --tags"},"keywords":["architect","microservices","deployment","node","sdk"],"author":{"name":"Architect.io"},"license":"GPL-3.0","devDependencies":{"@types/node":"^12.6.8","@types/protobufjs":"^6.0.0","protobufjs":"^6.8.8","ts-node":"^8.3.0","typescript":"^3.5.3"},"dependencies":{"axios":"^0.19.0"},"gitHead":"c592a7067de34c95242967aeed1cb298f5f022ea","_id":"@architect-io/sdk@0.2.2","_nodeVersion":"12.13.0","_npmVersion":"6.12.0","dist":{"integrity":"sha512-CJdorUyLSVhgfDYkI3kq8tpjSaCEY/oT4YCcqLL58GFFiY9/KbFqzWomVR65bUIVQpN7b2cfDlsUoL5vFZWxKQ==","shasum":"326216f73c9d758c67fd2dedb075b16d0f5df0b2","tarball":"https://registry.npmjs.org/@architect-io/sdk/-/sdk-0.2.2.tgz","fileCount":29,"unpackedSize":44552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwbmVCRA9TVsSAnZWagAASB4QAJlBji0LZ+T3dBkf5rsw\ncW7mxJBl6jL1wXbbyq02vpiR8TxY40cGOO4lz+0YUKT9bBQ/CJfQU45mk4oG\n8P5raBv74QIEZM7WgDWQelbaq79CVwzSeNNh/W1ReFiI/SXjMVKV5j9lLO91\nkNuN/f7iRk2YoYvP5YTqJtMQcttcHEJU0GImIYBllq9X6OVCWycTyHJtDB6l\n86EB3/3xmRkFrGo5vw+XtIJ3u08PNImYqnRh6GK4anQngap5AcflECNMj+ei\nM4oNzebuwtWdhK7aL/bdpMQdX+WA/an5cpsIlUTQd5MkM13ZhDA83mOsvhx5\neJARvtWebaDGLMKCQxnkEXq5ehxyI21QgoFpciUJngn5YGFnkfAl7RCdqy7H\nsu3cLbrk6CfFZanYvlSAAs2gqX0b34Qv8us5OZ/SMPFe98WPB1aHsTVVcspF\nV6CdlYrxPt/EqWKVz1OT/AcibRUA/+x39ilG3N/l+oZQJk9jmsjpk4PwcE/n\n/mubQ8eBSFsQ2sXXxkqyjN63/rC6oTc+E9WcSoNg93oDHYTvhF6f8aLI4jP5\nJsNr8tXF/yFqVLYQs+8jljWHM+iRy3p6jFqVroVMSgTmSF2AjXHw3Jm9kJOj\nPubYEAbMyBTAEfMGFiut2cR3AlgDPLCZ/ddiKDdWRExj4UwT79ui9SxvR+0b\nOxvE\r\n=yA6n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH/Z6JTU2HsBEKKg7DQ52DB+D7nQAaxjP7ck7fzL88IqAiEAvKf1dIKRXtLH4hRj20Cbt/J9LjWvr8qyyAEjx5g+bQQ="}]},"maintainers":[{"name":"david.thor","email":"david.thor@arcussolutions.com"},{"name":"tjhiggins","email":"tj@architect.io"}],"_npmUser":{"name":"david.thor","email":"david.thor@arcussolutions.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sdk_0.2.2_1572977044535_0.5866451929711187"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-23T21:14:47.883Z","0.1.0":"2019-07-23T21:14:48.199Z","modified":"2023-05-30T14:38:42.185Z","0.1.1":"2019-07-24T20:35:25.170Z","0.2.0":"2019-08-02T16:07:23.917Z","0.2.1":"2019-08-12T13:52:38.144Z","0.2.2":"2019-11-05T18:04:04.687Z"},"maintainers":[{"email":"ryan.cahill@architect.io","name":"ryancahill444"},{"email":"michael.muesch@architect.io","name":"mueschm-architect"},{"email":"david.thor@arcussolutions.com","name":"david.thor"}],"description":"Node.js SDK for Architect.io","homepage":"https://github.com/architect-team/node-sdk","keywords":["architect","microservices","deployment","node","sdk"],"repository":{"type":"git","url":"git+https://github.com/architect-team/node-sdk.git"},"author":{"name":"Architect.io"},"bugs":{"url":"https://github.com/architect-team/node-sdk/issues"},"license":"GPL-3.0","readme":"Architect Node.js SDK\n=====================\nThis is the Node.js SDK used for brokering connections to microservice dependencies via Architect's deployment platform. If you're unfamiliar with the platform or our deploy tools, please check out [Architect.io](https://app.architect.io) and our [CLI](https://github.com/architect-team/architect-cli) to get started.\n\n## Installation\n\n```sh\n$ npm i @architect-io/sdk --save\n```\n\n# SDK Documentation\n\n## Connecting to dependencies\n\n```javascript\nimport architect from '@architect-io/sdk';\n\nconst my_dependency = architect.service('my_dependency_name');\n\n// Client used to connect to service\nconst client = my_dependency.client;\n\n// Dynamically imported models used for message formatting\n// Used by protocols supporting code-gen like gRPC\nconst defs = my_dependency.defs;\n```\n\n### REST\nThe Architect SDK uses the popular REST client, [Axios](https://github.com/axios/axios), to broker communication to downstream REST microservices. The client that is provided is an Axios [instance](https://github.com/axios/axios#instance-methods) that is enriched with the proper service location meaning only URIs and HTTP actions need be provided:\n\n```javascript\nconst axios_res = await my_dependency.client.get('/resource');\nconst axios_res = await my_dependency.client.post('/resource', { data });\nconst axios_res = await my_dependency.client.put('/resource/:resource_id', { data });\nconst axios_res = await my_dependency.client.delete('/resource/:resource_id');\n```\n\n### gRPC\nArchitect handles the code-gen for gRPC services for you. Every time you run `$ architect install ...`, you'll find relevant gRPC stubs generated and placed inside an `architect_services` folder in your service's root directory. This SDK handles the import of generated model objects for parsing input/output messages as well as the import and enrichment of client code for making calls to dependencies.\n\n```protobuf\n// example.proto\nsyntax = \"proto3\";\n\npackage example_service;\n\nmessage PayRequest {\n    int32 amount = 1;\n}\n\nmessage PayResponse {\n    int32 output = 1;\n}\n\nservice Example {\n  rpc Pay (PayRequest) returns (PayResponse) {}\n}\n```\n\n```javascript\n// Model definitions will match message names in the .proto file for the service\nconst pay_req = my_dependency.defs.PayRequest();\npay_req.setAmount(10);\n\n// Client will automatically have methods matching the service definition from \n// the dependency's .proto file. Response handling matches gRPC documentation.\nmy_dependency.client.pay(pay_req, (error, grpc_res) => {\n  const output = grpc_res.getOutput();\n});\n```\n\n## Connecting to data stores\nSince there are so many DB clients available, we don't want to choose a default for developers. Instead, the Architect SDK provides easy mechanics to parse credentials provided by the platform:\n\n```javascript\nimport architect from '@architect-io/sdk';\nimport {createConnection} from \"typeorm\";\n\n// Key used to cite the datastore must match the key used in your \n// architect service config\nconst db_config = architect.datastore('primary_db');\nconst connection = await createConnection({\n   type: \"postgres\",\n   host: db_config.host,\n   port: db_config.port,\n   username: db_config.username,\n   password: db_config.password,\n   database: db_config.name\n});\n```\n\n## Events and messaging\nThe Architect platform also supports pub/sub based communication between services. The primary use-case for this flow would be to allow services to broadcast events for other services to subscribe to without needing to know who the subscribers are.\n\nNOTE: As of v0.2.x of the SDK, the only method for publishing/subscribing to events using Architect is via REST (mirroring the function of traditional webhooks). We're actively working on means of supporting queuing systems like RabbitMQ, AWS SQS, and more.\n\n### Subscribing\n\n```javascript\n// architect.json\n{\n  \"subscriptions\": {\n    \"<service_name>\": {\n      \"<event_name>\": {\n        \"uri\": \"/event/callback\",\n        \"headers\": {\n          \"x-custom-header\": \"example\"\n        }\n      }\n    }\n  }\n}\n```\n\nThe URI used for registration must match a URI on your service:\n\n```javascript\nimport * as express from 'express';\nimport architect from '@architect-io/sdk';\n\nconst app = express();\n\napp.post('/event/callback', (req, res) => {\n  // Custom event handling here...\n});\n\napp.listen(process.env.PORT);\n```\n\n### Publishing\n_NOTE: simple publication methods coming soon. For now, you can iterate through\nsubscribers to submit events._\n\n```js\n// architect.json\n{\n  \"notifications\": [\"<event_name>\"]\n}\n```\n\n```javascript\nimport * as axios from 'axios';\nimport architect from '@architect-io/sdk';\n\n// Iterate through notification subscribers to POST payload\narchitect.notification('<event_name>').subscriptions.forEach(async (sub) => {\n  const axios_instance = axios.create({\n    baseURI: `${sub.host}:${sub.port}`,\n    headers: sub.headers\n  });\n  await axios_instance.post(sub.uri, { payload });\n});\n```\n","readmeFilename":"README.md"}