{"_id":"@darkonig/wsdl-tsclient","_rev":"1-7ea34548c131cb5475a303414c5879e9","name":"@darkonig/wsdl-tsclient","dist-tags":{"latest":"1.4.2"},"versions":{"1.4.1":{"name":"@darkonig/wsdl-tsclient","version":"1.4.1","description":"Generate typescript soap client with typescript definitons from WSDL file.","main":"dist/src/index.js","bin":{"wsdl-tsclient":"dist/src/cli.js"},"engines":{"node":">=10.0.0"},"scripts":{"pretest":"rm -rf ./test/generated","test":"npm run test:node-soap && npm run test:node-soap2 && npm run test:public","test:node-soap":"ts-node node_modules/tape/bin/tape ./test/node-soap/*.test.ts | tap-spec","test:node-soap2":"ts-node node_modules/tape/bin/tape ./test/node-soap/**/*.test.ts | tap-spec","test:public":"ts-node node_modules/tape/bin/tape ./test/resources-public/**/*.test.ts | tap-spec","preversion":"npm test && npm run build","prepublishOnly":"npm test && npm run dist","dev":"ts-node -T ./dev.ts","dist":"tsc","build":"tsc","lint":"eslint ./src","lint:fix":"eslint --fix ./src"},"repository":{"type":"git","url":"git+https://github.com/darkonig/wsdl-tsclient.git"},"keywords":["soap","soap-client","wsdl","wsdl-client","typescript"],"author":{"name":"Daniel Derevjanik","email":"daniel.derevjanik@gmail.com"},"contributors":[{"name":"Caio Andrade"}],"license":"MIT","bugs":{"url":"https://github.com/darkonig/wsdl-tsclient/issues"},"homepage":"https://github.com/darkonig/wsdl-tsclient#readme","devDependencies":{"prettier":"^2.6.2","tap-spec":"^5.0.0","tape":"^5.5.3","ts-node":"^10.7.0","typescript":"^4.6.3"},"dependencies":{"@types/node":"^17.0.24","@types/supports-color":"^8.1.0","@types/tape":"^4.13.2","@types/yargs":"^16.0.1","@typescript-eslint/eslint-plugin":"^5.19.0","@typescript-eslint/parser":"^5.19.0","camel-to-kebab":"^1.1.2","camelcase":"^6.3.0","chalk":"^4.1.1","eslint":"^8.13.0","eslint-plugin-prettier":"^4.0.0","sanitize-filename":"^1.6.3","soap":"^1.0.0","supports-color":"^8.1.1","ts-morph":"^14.0.0","yargs":"^16.2.0"},"types":"./dist/src/index.d.ts","gitHead":"4eb77987ec68bc9e266776643ae8b48055ff531c","_id":"@darkonig/wsdl-tsclient@1.4.1","_nodeVersion":"16.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-XR2GxpELY0JOeddkvmSElgApftP+FJXz0g0ZggsEfCGcD97HEbbx2bO1yAi25FLI5tgQbM6zkoChWyDiHqSNuA==","shasum":"a2c97ec065d805968130996e0808ab54af902421","tarball":"https://registry.npmjs.org/@darkonig/wsdl-tsclient/-/wsdl-tsclient-1.4.1.tgz","fileCount":53,"unpackedSize":164049,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDMSdWL3RKi+svPhr70PUyauOj4lt/+zTz8vNglqqgEBAiEAws/iQBBvnDSDw7Dy7SWno8VNeAD7/Ek7Gz8p4p1tDp8="}]},"_npmUser":{"name":"darkonig","email":"earl.vinicius@gmail.com"},"directories":{},"maintainers":[{"name":"darkonig","email":"earl.vinicius@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wsdl-tsclient_1.4.1_1683317641084_0.37560641343579104"},"_hasShrinkwrap":false},"1.4.2":{"name":"@darkonig/wsdl-tsclient","version":"1.4.2","description":"Generate typescript soap client with typescript definitons from WSDL file.","main":"dist/src/index.js","bin":{"wsdl-tsclient":"dist/src/cli.js"},"engines":{"node":">=10.0.0"},"scripts":{"pretest":"rm -rf ./test/generated","test":"npm run test:node-soap && npm run test:node-soap2 && npm run test:public","test:node-soap":"ts-node node_modules/tape/bin/tape ./test/node-soap/*.test.ts | tap-spec","test:node-soap2":"ts-node node_modules/tape/bin/tape ./test/node-soap/**/*.test.ts | tap-spec","test:public":"ts-node node_modules/tape/bin/tape ./test/resources-public/**/*.test.ts | tap-spec","preversion":"npm test && npm run build","prepublishOnly":"npm test && npm run dist","dev":"ts-node -T ./dev.ts","dist":"tsc","build":"tsc","lint":"eslint ./src","lint:fix":"eslint --fix ./src"},"repository":{"type":"git","url":"git+https://github.com/darkonig/wsdl-tsclient.git"},"keywords":["soap","soap-client","wsdl","wsdl-client","typescript"],"author":{"name":"Daniel Derevjanik","email":"daniel.derevjanik@gmail.com"},"contributors":[{"name":"Caio Andrade"}],"license":"MIT","bugs":{"url":"https://github.com/darkonig/wsdl-tsclient/issues"},"homepage":"https://github.com/darkonig/wsdl-tsclient#readme","devDependencies":{"prettier":"^2.6.2","tap-spec":"^5.0.0","tape":"^5.5.3","ts-node":"^10.7.0","typescript":"^4.6.3"},"dependencies":{"@types/node":"^17.0.24","@types/supports-color":"^8.1.0","@types/tape":"^4.13.2","@types/yargs":"^16.0.1","@typescript-eslint/eslint-plugin":"^5.19.0","@typescript-eslint/parser":"^5.19.0","camel-to-kebab":"^1.1.2","camelcase":"^6.3.0","chalk":"^4.1.1","eslint":"^8.13.0","eslint-plugin-prettier":"^4.0.0","sanitize-filename":"^1.6.3","soap":"^1.0.0","supports-color":"^8.1.1","ts-morph":"^14.0.0","yargs":"^16.2.0"},"types":"./dist/src/index.d.ts","gitHead":"4cfad67399b6587f9aab27e7a6e4fc518e4bd617","_id":"@darkonig/wsdl-tsclient@1.4.2","_nodeVersion":"16.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-0utidmcXq41ctMfxpa5FCadjxcxCkwXP/rVfsRl/C3oUW83cNokdT/xWCGpkBc8UXDFVAoOD9Q+xJL2DXqrsNg==","shasum":"28b4b61764da473727a28f7eb6d16d749f5642d9","tarball":"https://registry.npmjs.org/@darkonig/wsdl-tsclient/-/wsdl-tsclient-1.4.2.tgz","fileCount":53,"unpackedSize":175135,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7Wbfj3REiluE1nBxmbaqlOhcIHorsMVptxV1XDpRMowIgaZhUA9XDepXMVI8+IG2IOpogzOiBv4WliwAfNOyMoYA="}]},"_npmUser":{"name":"darkonig","email":"earl.vinicius@gmail.com"},"directories":{},"maintainers":[{"name":"darkonig","email":"earl.vinicius@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wsdl-tsclient_1.4.2_1686361054613_0.8861334194615116"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-05T20:14:00.915Z","1.4.1":"2023-05-05T20:14:01.327Z","modified":"2023-06-10T01:37:34.939Z","1.4.2":"2023-06-10T01:37:34.825Z"},"maintainers":[{"name":"darkonig","email":"earl.vinicius@gmail.com"}],"description":"Generate typescript soap client with typescript definitons from WSDL file.","homepage":"https://github.com/darkonig/wsdl-tsclient#readme","keywords":["soap","soap-client","wsdl","wsdl-client","typescript"],"repository":{"type":"git","url":"git+https://github.com/darkonig/wsdl-tsclient.git"},"contributors":[{"name":"Caio Andrade"}],"author":{"name":"Daniel Derevjanik","email":"daniel.derevjanik@gmail.com"},"bugs":{"url":"https://github.com/darkonig/wsdl-tsclient/issues"},"license":"MIT","readme":"# WSDL TSClient\n\n**Example how to generate and use wsdl-tsclient:** [wsdl-tsclient-example](https://github.com/dderevjanik/wsdl-tsclient-example)\n\nGenerate a [soap client](https://www.npmjs.com/package/soap) with typescript definitions from a WSDL file.\n\nThis library uses [ts-morph](https://www.npmjs.com/package/ts-morph) to generate typescript code and [soap](https://github.com/vpulim/node-soap) for runtime. Inspired by Java [wsimport](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/wsimport.html) and [openapi-generator](https://github.com/OpenAPITools/openapi-generator).\n\n*NOTE:* Add [soap](https://www.npmjs.com/package/soap) to your npm runtime dependencies (`npm i soap`).\n\n## Install\n\n```sh\nnpm i wsdl-tsclient\n```\n\nor install it with `-g` to have CLI globally available.\n\n```sh\nnpm i -g wsdl-tsclient\n```\n\n## Usage\n\nYou can check example repository [wsdl-tsclient-example](https://github.com/dderevjanik/wsdl-tsclient-example)\n\n### Generate client using CLI\n\nEasiest way to generate client from is to use CLI. You need to provide only path to `.wsdl` file and\npath to output directory (`-o` param). If you want to generate **only typescript types** (no runtime code) for node-soap, you can pass `--emitDefinitionsOnly` param.\n\n`wsdl-tsclient ./soap.wsdl -o ./generated`\n\n`wsdl-tsclient ./resources/**/*.wsdl -o ./generated` - using glob\n\nyou can also use `npx`\n\n`npx wsdl-tsclient ./soap.wsdl -o ./generated`\n\n```bash\nwsdl-tsclient [options] [path]\n\nOptions:\n      --help                        Show help                          [boolean]\n  -v, --version                                                        [boolean]\n  -o                                Output directory         [string] [required]\n      --emitDefinitionsOnly         Generate only Definitions          [boolean]\n      --modelNamePreffix            Prefix for generated interface names[string]\n      --modelNameSuffix             Suffix for generated interface names[string]\n      --caseInsensitiveNames        Case-insensitive name while parsing\n                                    definition names                   [boolean]\n      --maxRecursiveDefinitionName  Maximum count of definition's with same name\n                                    but increased suffix. Will throw an error if\n                                    exceed                              [number]\n      --kebabFileName               Name files using kebab format (file-name.ts)\n                                                                        [boolean]\n      --deduplicateSoapMethods      Remove duplicated methods from the client \n      --generateAttributes          Generate element attributes        [boolean]\n                                    interface                          [boolean]\n      --quiet                       Suppress all logs                  [boolean]\n      --verbose                     Print verbose logs                 [boolean]\n      --no-color                    Logs without colors                [boolean]\n\nExamples:\n    wsdl-tsclient file.wsdl -o ./generated/\n    wsdl-tsclient ./res/**/*.wsdl -o ./generated/\n```\n\n### Generate client programmatically\n\n```typescript\nimport { generateClient } from \"wsdl-tsclient\";\n\nparseAndGenerate(\"./path/to/MyWsdl.wsdl\", \"./generated/\");\n```\n\n### Using generated client in your project\n\n*Note:* Make sure you have [soap](https://www.npmjs.com/package/soap) package in your runtime dependencies (`npm i soap`)\n\n```typescript\nimport { createClientAsync } from \"./generated/MyWsdl\";\n\nconst client = await createClientAsync(\"./path/to/wsdl.wsdl\");\nclient.CallSoapMethodAsync();\n```\n\nSetting basic auth \n\n```typescript\nimport soap from \"soap\";\nimport { createClientAsync } from \"./generated/MyWsdl\";\n\nconst client = await createClientAsync(\"./path/to/wsdl.wsdl\");\n\nconst basicAuth = new soap.BasicAuthSecurity(auth.username, auth.password);\nclient.setSecurity(basicAuth);\n\nclient.CallSoapMethodAsync();\n```\n\nfor more information about the use of the client, read more about [soap](https://github.com/vpulim/node-soap)\n\n## How it works\n\n![overview](./docs/Overview.png)\n\n## License\n\nThe source code is licensed under the [MIT](./LICENSE) license\n\n## Contributors\n\n![Contributors](https://contrib.rocks/image?repo=dderevjanik/wsdl-tsclient)\n","readmeFilename":"README.md"}