{"_id":"@andrewcturing/salesforce-webhooks","_rev":"4-7c087ea6ccb13cd8d6ff941ae150f9eb","name":"@andrewcturing/salesforce-webhooks","dist-tags":{"latest":"1.1.14"},"versions":{"1.1.10":{"name":"@andrewcturing/salesforce-webhooks","version":"1.1.10","description":"Provides an interface to create webhooks in Salesforce for different SObject events","keywords":["salesforce","webhook","promise","async"],"main":"dist","module":"src/index.js","esm":{"cjs":true},"scripts":{"build":"webpack","build:debug":"yarn build --mode development","build:release":"yarn build --mode production","test":"mocha","test:coverage":"c8 yarn test","clean":"rm -rf dist","lint":"eslint .","lint:format":"yarn lint --fix"},"repository":{"type":"git","url":"git+https://github.com/jverce/salesforce-webhooks.git"},"author":{"name":"jverce"},"license":"Apache-2.0","bugs":{"url":"https://github.com/jverce/salesforce-webhooks/issues"},"homepage":"https://github.com/jverce/salesforce-webhooks#readme","devDependencies":{"antlr4ts":"^0.5.0-alpha.3","apex-parser":"^2.5.0","c8":"^7.7.3","chai":"^4.2.0","chai-as-promised":"^7.1.1","clean-webpack-plugin":"^3.0.0","eslint":"^7.28.0","eslint-plugin-jsonc":"^1.3.1","eslint-plugin-putout":"^8.0.1","esm":"^3.2.25","handlebars":"^4.7.6","install":"^0.13.0","jsonwebtoken":"^8.5.1","junit-xml":"^1.2.0","libxmljs":"^0.19.10","mocha":"^8.2.1","putout":"^18.1.1","sinon":"^9.2.1","webpack":"^5.6.0","webpack-cli":"^4.2.0","yargs":"^16.1.1"},"dependencies":{"axios":"^0.21.0","bindings":"^1.5.0","handlebars-loader":"^1.7.1","uuid":"^8.3.1"},"gitHead":"be3a1e78cf9bb10541abbec9efd2b47b3cbcbd71","_id":"@andrewcturing/salesforce-webhooks@1.1.10","_nodeVersion":"17.8.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-7Tiwel7LfsXUdSLL2esT/VNo40SRRb1u2APJ43rEP6Jhk+T+r7DlN4tmQeTx0YHOTQfgqneXHH2gRFpO3hysAQ==","shasum":"a02bc52fa95779c2a2e72fbc7ed0781e056434fb","tarball":"https://registry.npmjs.org/@andrewcturing/salesforce-webhooks/-/salesforce-webhooks-1.1.10.tgz","fileCount":5,"unpackedSize":665525,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCfhfGWKEB/5zjNkn9C58Rtfb7ZPovjKMqQVxEfA+I/vwIhAPdTH8/T+cgYSYqVjhodK96eJtJFkVtM22iduE9qbJOa"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGivOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1+w/7B0pMSLmbLGd4PAsbAChoGO+dYw662sku7xUi/rqxjJnfbLFM\r\nbpZlodz1DyzjCXZx2Oz9O4FqozZLocrIZBn0HnmK9ZneLhEfwDeVSQjj75zf\r\n4zttmYhiygVMRtUokSjLNemt0ulXLLVcnxzlShAGIuSnN9DpuAJeSjzmssoR\r\nATqpiwo2TMntqqBcV1Gl3fXZajKdXFtX0kWLAy88m6LinDpc5zEIEgPvfLAn\r\n0cD4YbKC9DEOXE9gjc5eHG/ch/fkyq42tUxDWLnlbfDqZEtViEdG88Zd2TBe\r\n0y93Hq7TRP3sIGnQy10LU1wUvL/1FgMC65uizJ2XaMC/39SLbmJU6nhY5hyR\r\nekauR4ccZ76k/dV6fy0FrxAuKU3nZBUgQS0jLGkrQ5I4db9GNq5Bf0RwJuz1\r\n6YvogCa9ZdXrRR9rEQ0dUclpunNfigJdOLD5vYuCYdbTPr+AI6VcElPITucL\r\nJWRn8It2bEtfcuJFxEPAaj8YIvGuoE7dd/q06Z4wTyE2z9RP2OKE2DW5npFR\r\n7CDjirp+IM4bBnATF/BrF+TDTt+Gpp2KDClx0GjbMn1ZPI3DPmxjb4X78X3C\r\nBbKL7cBCuWqQZV5gfMD5O7VoVwFjgOtfNfBe3z8e1PdmhNlpriwPMN6tNT4C\r\nSFdKPsKHVsoSPiBfVWPTiEHx0BTKvxhpyoc=\r\n=Tu+o\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"andrewcturing","email":"andrew.c@turing.com"},"directories":{},"maintainers":[{"name":"andrewcturing","email":"andrew.c@turing.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/salesforce-webhooks_1.1.10_1662659534539_0.6557801791746662"},"_hasShrinkwrap":false},"1.1.11":{"name":"@andrewcturing/salesforce-webhooks","version":"1.1.11","description":"Provides an interface to create webhooks in Salesforce for different SObject events","keywords":["salesforce","webhook","promise","async"],"main":"dist","module":"src/index.js","esm":{"cjs":true},"scripts":{"build":"webpack","build:debug":"yarn build --mode development","build:release":"yarn build --mode production","test":"mocha","test:coverage":"c8 yarn test","clean":"rm -rf dist","lint":"eslint .","lint:format":"yarn lint --fix"},"repository":{"type":"git","url":"git+https://github.com/jverce/salesforce-webhooks.git"},"author":{"name":"jverce"},"license":"Apache-2.0","bugs":{"url":"https://github.com/jverce/salesforce-webhooks/issues"},"homepage":"https://github.com/jverce/salesforce-webhooks#readme","devDependencies":{"antlr4ts":"^0.5.0-alpha.3","apex-parser":"^2.5.0","c8":"^7.7.3","chai":"^4.2.0","chai-as-promised":"^7.1.1","clean-webpack-plugin":"^3.0.0","eslint":"^7.28.0","eslint-plugin-jsonc":"^1.3.1","eslint-plugin-putout":"^8.0.1","esm":"^3.2.25","handlebars":"^4.7.6","install":"^0.13.0","jsonwebtoken":"^8.5.1","junit-xml":"^1.2.0","libxmljs":"^0.19.10","mocha":"^8.2.1","putout":"^18.1.1","sinon":"^9.2.1","webpack":"^5.6.0","webpack-cli":"^4.2.0","yargs":"^16.1.1"},"dependencies":{"axios":"^0.21.0","bindings":"^1.5.0","handlebars-loader":"^1.7.1","uuid":"^8.3.1"},"gitHead":"be3a1e78cf9bb10541abbec9efd2b47b3cbcbd71","_id":"@andrewcturing/salesforce-webhooks@1.1.11","_nodeVersion":"17.8.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-wgdKm09CRPd2Q1yoaMHYWEBaJupLRB3fbjK9brt9gbIu7p9lxKytmD2csYq/2/NIT1jg9x6ykx3RVQ05BsHjcQ==","shasum":"80f02f54d9d0c9d2621b7197fe2dc9c61f4e1093","tarball":"https://registry.npmjs.org/@andrewcturing/salesforce-webhooks/-/salesforce-webhooks-1.1.11.tgz","fileCount":3,"unpackedSize":24491,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICvtLDscJc6gRQUROPNBFhrgONVnK/FnD8IFM3ii/L7WAiB8B/aosGG/oOWgRMg+ymI90mCZL2mi2YgyruOPWwRsYQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGyZEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3ERAAoqeMz+XeySDiKX2A7eMBFNeYT62KzUfDmb0kGxPljxA3uGLz\r\nGeaAQyUY9cuD3Q5y4AQcz6MHpMzMdg5OPov5xHUTNaC68zYe9Zrb+/ymQ9LR\r\nUPQHBAo0WHsWhdoCx083n7b2Nb/EP3drMNQTpITMH7Yd4MuRiSjhUj/a9snS\r\nj84gvi3+V2bFFkBaTO8S9iammptfc4u5NQxWIumbD6l7TtvEq5gTTd+pwjI9\r\n9raGlzJh00u90NifsArFfgH77pvoy/Xb6pkXxTUJLkpMt/GW3v2OlXGGoevF\r\n8y8CgrtGzlnzoyzL9AlZ2xNcUTwhUGc3LFe0UQFlEzV2lFMKRDzhInqEToDF\r\nash9qXcx0hS6nLrm6T0iMur3EOg0ccRi1npQr8I8tjgvIZP1A98botkGXIqB\r\nsCXbSHp9ZnjRHD4IHkJqeymVGwpzvcq3b89sZF9yGZUQXQQlW5pGBNwvuKIF\r\nDkZZyEqMWX1xh0txdHMlsctJlg7yooDJaE1RaTYtflMQg7MXThGh2Zy3mWyd\r\ndUBlpNdc87Xk7lFkg0IjJyDgubJTstcYfRhFvOEWyE7sFRAfkV0rzLmtn5tO\r\norDs1r0oNxZsRb8prmNZQZiMEDmqUJIB84vL+KdUG1veKZEBpWLc/SuEpmsO\r\nYgNdeQwUk1gPKqci5Od/eycdlbUGUxELPKk=\r\n=oOrB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"andrewcturing","email":"andrew.c@turing.com"},"directories":{},"maintainers":[{"name":"andrewcturing","email":"andrew.c@turing.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/salesforce-webhooks_1.1.11_1662723652261_0.6355403382727884"},"_hasShrinkwrap":false},"1.1.12":{"name":"@andrewcturing/salesforce-webhooks","version":"1.1.12","description":"Provides an interface to create webhooks in Salesforce for different SObject events","keywords":["salesforce","webhook","promise","async"],"main":"dist","module":"src/index.js","esm":{"cjs":true},"scripts":{"build":"webpack","build:debug":"yarn build --mode development","build:release":"yarn build --mode production","test":"mocha","test:coverage":"c8 yarn test","clean":"rm -rf dist","lint":"eslint .","lint:format":"yarn lint --fix"},"repository":{"type":"git","url":"git+https://github.com/jverce/salesforce-webhooks.git"},"author":{"name":"jverce"},"license":"Apache-2.0","bugs":{"url":"https://github.com/jverce/salesforce-webhooks/issues"},"homepage":"https://github.com/jverce/salesforce-webhooks#readme","devDependencies":{"antlr4ts":"^0.5.0-alpha.3","apex-parser":"^2.5.0","c8":"^7.7.3","chai":"^4.2.0","chai-as-promised":"^7.1.1","clean-webpack-plugin":"^3.0.0","eslint":"^7.28.0","eslint-plugin-jsonc":"^1.3.1","eslint-plugin-putout":"^8.0.1","esm":"^3.2.25","handlebars":"^4.7.6","install":"^0.13.0","jsonwebtoken":"^8.5.1","junit-xml":"^1.2.0","libxmljs":"^0.19.10","mocha":"^8.2.1","putout":"^18.1.1","sinon":"^9.2.1","webpack":"^5.6.0","webpack-cli":"^4.2.0","yargs":"^16.1.1"},"dependencies":{"axios":"^0.21.0","bindings":"^1.5.0","handlebars-loader":"^1.7.1","uuid":"^8.3.1"},"gitHead":"be3a1e78cf9bb10541abbec9efd2b47b3cbcbd71","_id":"@andrewcturing/salesforce-webhooks@1.1.12","_nodeVersion":"17.8.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-S3EauXs31esZ/Y9acbXcODq66iw6agCd5fdrwHrtH6Nw+V0CsvmBA4gw255XI7wLfSfUrXDtocFUa3XqEon2Bg==","shasum":"994e9fddfc4f449719130407d5053f44a43861c6","tarball":"https://registry.npmjs.org/@andrewcturing/salesforce-webhooks/-/salesforce-webhooks-1.1.12.tgz","fileCount":5,"unpackedSize":665494,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9fTJqaD6ewdFlVXpcvh7lQdvS09zGHlsdnM60eET27wIhAPS99lehUYwdO8a+aAeXHWMLIQYZwy5HCL/r8xmDPYwU"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGydDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqsbw/6Au8CcC5+A9dUXGwvGs0PqTB+V7o8KNRlF3UEiZIQ+fuNc6Qk\r\nX6qKDXC+2gAwmjrAIqHjT+pyuVUPEV3SbBteQX6gI0hSz5Ik74ao+IIEkZrK\r\nsp+VYr4Lhjylta1N9fDvJKK7eujJ/XOvuCCwKAmomQhm1ZhI5B33H5+6Szvv\r\nVwmmFD0lvTG/MRwBLjjCK8YtdvBDEsqUw0TktnOycF9qUoFmkagMJsYUdJml\r\ngPY/ssuJAWWlth+aimPj/Q2evVuyvzsWEIjTt4Ipu+E8L0PedwPYCEtMLEg/\r\nzhubz5u76lPGx5gG/tMPsHnmF5cIKG9xkO4hZs7bpWI3Kujb7FaJvktSB21V\r\nhHPYmY27ZbQ6Wia5jLDMbXYaBsevYi6EA9SNu6y1EvgrE6qYtZYED4pqFP7a\r\nxr3ZjqPQNC5ZxUR06Wb9oJmMl0fCZ7cyOZnBUm/tfRIzpmmpi5t6lmwzugst\r\n1kc7nI7e/u5xrkpqDiJ3JHUolYisstQm8lZD0Htp8OTm7R4CFhyROgzGiQcy\r\niEOnKhL7INdWuCANievyrMLB/sc2vMbKSGIaMPS05U99h+u1ExNLAUVEzYF9\r\nhUBUUklGo06AcLeISX1snT+lMduEbFoDgPPjCfCBYzQTPAiI/8bh2YrXwmOx\r\nZhRvOqi11MFL0G+HRD8+2omS9CPrgi2U6sc=\r\n=SlLv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"andrewcturing","email":"andrew.c@turing.com"},"directories":{},"maintainers":[{"name":"andrewcturing","email":"andrew.c@turing.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/salesforce-webhooks_1.1.12_1662723906984_0.18785960347393194"},"_hasShrinkwrap":false},"1.1.13":{"name":"@andrewcturing/salesforce-webhooks","version":"1.1.13","description":"Provides an interface to create webhooks in Salesforce for different SObject events","keywords":["salesforce","webhook","promise","async"],"main":"dist","module":"src/index.js","esm":{"cjs":true},"scripts":{"build":"webpack","build:debug":"yarn build --mode development","build:release":"yarn build --mode production","test":"mocha","test:coverage":"c8 yarn test","clean":"rm -rf dist","lint":"eslint .","lint:format":"yarn lint --fix"},"repository":{"type":"git","url":"git+https://github.com/jverce/salesforce-webhooks.git"},"author":{"name":"jverce"},"license":"Apache-2.0","bugs":{"url":"https://github.com/jverce/salesforce-webhooks/issues"},"homepage":"https://github.com/jverce/salesforce-webhooks#readme","devDependencies":{"antlr4ts":"^0.5.0-alpha.3","apex-parser":"^2.5.0","c8":"^7.7.3","chai":"^4.2.0","chai-as-promised":"^7.1.1","clean-webpack-plugin":"^3.0.0","eslint":"^7.28.0","eslint-plugin-jsonc":"^1.3.1","eslint-plugin-putout":"^8.0.1","esm":"^3.2.25","handlebars":"^4.7.6","install":"^0.13.0","jsonwebtoken":"^8.5.1","junit-xml":"^1.2.0","libxmljs":"^0.19.10","mocha":"^8.2.1","putout":"^18.1.1","sinon":"^9.2.1","webpack":"^5.6.0","webpack-cli":"^4.2.0","yargs":"^16.1.1"},"dependencies":{"axios":"^0.21.0","bindings":"^1.5.0","handlebars-loader":"^1.7.1","uuid":"^8.3.1"},"gitHead":"0719a490c5721844b15e6ea18002c36a75ad694e","_id":"@andrewcturing/salesforce-webhooks@1.1.13","_nodeVersion":"17.8.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-BnYQsqArCihHGjWrCuUV0Jbs5QEjKgUrSQ9Lz8Z+5vBnFRC2n4LWl1vhoiws7BloBEibPCLa3Qvlb87HWuSA6A==","shasum":"b624c8c0fee7c01bde29ec623abd0a1f76e4f8d1","tarball":"https://registry.npmjs.org/@andrewcturing/salesforce-webhooks/-/salesforce-webhooks-1.1.13.tgz","fileCount":5,"unpackedSize":686937,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEsqw2Bcwks4a4bc/lx/ek714FV4woRzRLiIf2jurx2kAiALfFsw4TXU9h7nc0Kh3R85qBTaESV11yvC6uGYv71Ztg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIHxFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpyhw//WpHVWxPiUhD+NWJoIF1EeMnF9oAjnTBhMkwNqInGiqs1KFXX\r\nFzJq7YIULSFqWfkBbl7eeh5bb+7pc9bnzLuhxeODy5SEWWBQWAtcUJD3bIrZ\r\ny3h4erDi9UKUP3fbmYQ3K2PvrIVzNyDjfkziCXHLqUj91aylaJ1ZalRSH3Ku\r\n8bb3sTwqXrefLHYSxZ/V/SvVXPTq4fVnIUlwcgKSBSDY0AB2dHg9BHtnil1o\r\nrVn85m7MzEpP7wWUwc1Sb7HUPEzk44nBYHACmrjvIKaN8+M6H38t8YLWaoZ3\r\njE9aNpi5EMKGc5ZJwpfXYOvbsEBO3134GH7Hgnf916xtNVGZQ0OCgTfxyFhQ\r\nlgS+TnOuVRq88a0b2n6xQ5WRZxP7BjJmJMPXE3eL/GitbcpNa7A38HVOwX32\r\nTowbJfKQEq48DnH93oM/+m2PTTjczfpDGuoxCM/jFHqbMSHVdoxaH92JbZ3h\r\nzx5pRpjWBCOoLYNyOzzdCWt9C62ZEI+TlQL4Cabt+Tf84CdwtG6RdNgrjALZ\r\nE+40evztXMrlprFAL6DviREDJvStZp1Bx5sdfSUIczQ8qUEOSZelaCHYfdTL\r\nKpmi5BNpub+z4PvuekKhsEV+xfVqhCqDvp5UX2pJ+TLQH7bDSOeLUCgyDvUR\r\nNyKy4RSFwHzB7lzOlpf3IVlAOkKm4Z/6uiI=\r\n=ov2z\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"andrewcturing","email":"andrew.c@turing.com"},"directories":{},"maintainers":[{"name":"andrewcturing","email":"andrew.c@turing.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/salesforce-webhooks_1.1.13_1663073349629_0.49943168482386624"},"_hasShrinkwrap":false},"1.1.14":{"name":"@andrewcturing/salesforce-webhooks","version":"1.1.14","description":"Provides an interface to create webhooks in Salesforce for different SObject events","keywords":["salesforce","webhook","promise","async"],"main":"dist","module":"src/index.js","esm":{"cjs":true},"scripts":{"build":"webpack","build:debug":"yarn build --mode development","build:release":"yarn build --mode production","test":"mocha","test:coverage":"c8 yarn test","clean":"rm -rf dist","lint":"eslint .","lint:format":"yarn lint --fix"},"repository":{"type":"git","url":"git+https://github.com/jverce/salesforce-webhooks.git"},"author":{"name":"jverce"},"license":"Apache-2.0","bugs":{"url":"https://github.com/jverce/salesforce-webhooks/issues"},"homepage":"https://github.com/jverce/salesforce-webhooks#readme","devDependencies":{"antlr4ts":"^0.5.0-alpha.3","apex-parser":"^2.5.0","c8":"^7.7.3","chai":"^4.2.0","chai-as-promised":"^7.1.1","clean-webpack-plugin":"^3.0.0","eslint":"^7.28.0","eslint-plugin-jsonc":"^1.3.1","eslint-plugin-putout":"^8.0.1","esm":"^3.2.25","handlebars":"^4.7.6","install":"^0.13.0","jsonwebtoken":"^8.5.1","junit-xml":"^1.2.0","libxmljs":"^0.19.10","mocha":"^8.2.1","putout":"^18.1.1","sinon":"^9.2.1","webpack":"^5.6.0","webpack-cli":"^4.2.0","yargs":"^16.1.1"},"dependencies":{"axios":"^0.21.0","bindings":"^1.5.0","handlebars-loader":"^1.7.1","uuid":"^8.3.1"},"gitHead":"0719a490c5721844b15e6ea18002c36a75ad694e","_id":"@andrewcturing/salesforce-webhooks@1.1.14","_nodeVersion":"17.8.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-dqeYvGZ11RjrTONewzJE1HdbdCKe9kmdf6SSv44SQLL4maAiWHwNGnbt6yRROdJZbanrMBzxubFuXqKuyxUJ6Q==","shasum":"41a39fe114a6f33d4e3a8b3067094cb4e921ffca","tarball":"https://registry.npmjs.org/@andrewcturing/salesforce-webhooks/-/salesforce-webhooks-1.1.14.tgz","fileCount":5,"unpackedSize":686937,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE9npAE43BfseUV+5lvoZ52UAA428XOjXU6Do4tC97YyAiBhp+ZopnejxTA2ZN3Lb8egZt9ODI49qX6QBYYfX7NF5Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIH5KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhGA//V7lOBpyShvOVhREWUvxAAdst1zsBaVWlJPDR1wN1pcg2TbXC\r\nF0PJrkPrcCraGdqc7SkNDQKiEN0upKydFggCJRls0VwwFveqFyTA1OjxbDdL\r\n6LiZoZifbCTbEROsf17EfI5MGpzdS6E3XYAzexcAp0n8AbQeOm1wZ056PXd6\r\n/8tUtM7nApyVyLWYAdiLh/OXMyboYmVw+exXSTbXpeWeInkvGQJ4bft3WEH9\r\nxRrg+kZbjKiR5+xOfxeUtNPnaTe3HPyO2x53NL2M7wDJjBAGmzhNaCaW/lvj\r\n4bcgumOSqLjsxdca1q7aXq1eN4LsCnwZU6dp7q6G3GKnYekNeiwVP1noIv3u\r\nNE+SH9dInqL3PafIGefASQyAoXcfMjPfNoTTQyfLWXXtla2R1XyFnqjj+Hi0\r\nm+gQ1z4zCl3wFvWz3yqDdtsqrYwZoibI7wQbjKTkSJuvxUlgyp2r2UGm6MWH\r\nzHb/Bu2MYN2Ty1A/x3qp5NO5vy9GczJRGr3hUveRB4kYDPJ0XV6y1wFdPmoo\r\nKDbd2zAwygcqwaAjEK4BT1lwbezDqBqBcHE74buJAQiwzr00v40k0PF8+pWr\r\n/Ai8zJ2GVQntlp+zFB1MSYoYxfmxbCByZzZGD+jHUyeC8zYXFepK8MUkon2f\r\nszjXI8kIWJEjapAXA8kPYvQuLudP05j48tM=\r\n=eWBU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"andrewcturing","email":"andrew.c@turing.com"},"directories":{},"maintainers":[{"name":"andrewcturing","email":"andrew.c@turing.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/salesforce-webhooks_1.1.14_1663073866241_0.2696725479268749"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-08T17:52:14.482Z","1.1.10":"2022-09-08T17:52:14.739Z","modified":"2022-09-13T12:57:46.548Z","1.1.11":"2022-09-09T11:40:52.423Z","1.1.12":"2022-09-09T11:45:07.173Z","1.1.13":"2022-09-13T12:49:09.789Z","1.1.14":"2022-09-13T12:57:46.476Z"},"maintainers":[{"name":"andrewcturing","email":"andrew.c@turing.com"}],"description":"Provides an interface to create webhooks in Salesforce for different SObject events","homepage":"https://github.com/jverce/salesforce-webhooks#readme","keywords":["salesforce","webhook","promise","async"],"repository":{"type":"git","url":"git+https://github.com/jverce/salesforce-webhooks.git"},"author":{"name":"jverce"},"bugs":{"url":"https://github.com/jverce/salesforce-webhooks/issues"},"license":"Apache-2.0","readme":"# Salesforce Webhooks\n\n[![jverce](https://circleci.com/gh/jverce/salesforce-webhooks.svg?style=shield)](https://app.circleci.com/pipelines/github/jverce/salesforce-webhooks)\n[![npm](https://img.shields.io/npm/v/salesforce-webhooks)](https://www.npmjs.com/package/salesforce-webhooks)\n\n## Introduction\n\nThe purpose of this package is to provide a convenient interface to the\nSalesforce API in order to create or delete webhooks in the Salesforce platform.\nIt offers a simple interface to create basic webhooks for \"created\", \"updated\"\nor \"deleted\" events on any\n[**SObject**](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_sobject.htm)\ntype (although such types must be _triggerable_, as specified by an [SObject's\nmetadata](https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_describe.htm))\n\n**Please note that this is a Node.js package and hasn't been tested in a\nbrowser-like environment.**\n\n## Getting Started\n\n### Installation\n\nNothing special here: just a regular NPM/Yarn Node.js package.\n\n#### NPM\n\n```bash\nnpm install --save salesforce-webhooks\n```\n\n#### Yarn\n\n```bash\nyarn add salesforce-webhooks\n```\n\n### Usage\n\nThis package can be used to either create or delete a webhook from Salesforce.\nIt just serves as an interface and convenience tool to do all the required\nwiring, customization and interaction with Salesforce under the hood. It does\nnot however keep track of created webhooks, **it's purpose is not to manage\nthose webhooks beyond creation or deletion of its low-level components**.\n\n#### Instantiation\n\nThe interface is exposed through the `SalesforceClient` class. To start, create\na new instance of this class by providing the following information about your\nSalesforce organization:\n\n- **Salesforce auth token**: a valid REST API token with write access to the\n  Salesforce SOAP API (see for example the [Salesforce REST API Developer\n  Guide](<https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart_oauth.htm>))\n- **Instance**: the instance identifier where the target organization is\n  running. See [this\n  page](https://help.salesforce.com/articleView?id=000314281&type=1&mode=1&language=en_US)\n  for more information.\n- **API Version**: this is an optional parameter. It is set to `50.0` by\n  default, and this is the target version for which this package was developed.\n\nThe above parameter names are `authToken`, `instance` and `apiVersion`,\nrespectively. So, to create a new instance of `SalesforceClient` execute the\nfollowing code:\n\n```js\nconst { SalesforceClient } = require(\"salesforce-webhooks\");\nconst authToken = \"a secret API token\"; // This is supposed to be secret!\nconst instance = \"na139\"; // This is just an example instance.\nconst client = new SalesforceClient({\n  authToken,\n  instance,\n  apiVersion: \"50.0\",\n});\nconsole.log(client);\n// SalesforceClient {\n//  authToken: 'a secret token',\n//  metadataApiUrl: 'https://na139.salesforce.com/services/Soap/m/50.0',\n//  soapApiUrl: 'https://na139.salesforce.com/services/Soap/s/50.0'\n//}\n```\n\n_Note that the `*ApiUrl` properties contain information about the instance and\nthe API version._\n\nThe client parameters can also be extracted from environment variables if they\nare not provided to the constructor:\n\n```bash\nexport SALESFORCE_API_VERSION='50.0'\nexport SALESFORCE_AUTH_TOKEN='a secret API token'\nexport SALESFORCE_INSTANCE='na139'\n```\n\nThe constructor will resort to the environment variables above if no valid\narguments were provided to it:\n\n```js\nconst { SalesforceClient } = require(\"salesforce-webhooks\");\nconst client = new SalesforceClient();\nconsole.log(client);\n// SalesforceClient {\n//  authToken: 'a secret token',\n//  metadataApiUrl: 'https://na139.salesforce.com/services/Soap/m/50.0',\n//  soapApiUrl: 'https://na139.salesforce.com/services/Soap/s/50.0'\n//}\n```\n\n#### Webhook Creation\n\nEvery webhook creation interface requires users to provide at least the\nfollowing arguments:\n\n- **`endpointUrl`**: the URL of the endpoint that the webhook should call\n  whenever it gets triggered\n- **`sObjectType`**: the type of SObject that this webhook will react to\n\nThe following interfaces serve the purpose of creating webhooks:\n\n- **`createWebhookNew`**: creates a webhook that gets triggers when a new object\n  is created\n- **`createWebhookUpdated`**: creates a webhook that gets triggers when an\n  object is updated\n- **`createWebhookDeleted`**: creates a webhook that gets triggers when an\n  object is deleted\n- **`createWebhook`**: it takes an additional argument `event` whose values can\n  be either `new`, `updated` or `deleted`, and it creates a webhook that gets\n  triggers when an event of type `event` happens to an object\n\nAn optional parameter called `secretToken` can be provided in order to verify\nthe authenticity of the HTTP calls at the target endpoint. Whenever the endpoint\nreceives an HTTP call, it can verify that the `X-Webhook-Token` header matches\nthe secret token provided through the `secretToken` argument.\n\nTo create a webhook that will make an HTTP POST call to <http://example.com>\nwhenever a new account is created, run the following code:\n\n```js\nconst client = new SalesforceClient(...);   // See the Instantiation section above.\nconst webhookOpts = {\n    endpointUrl: 'http://example.com',\n    sObjectType: 'Account',\n    secretToken: 'some secret arbitrary string',\n};\nconst webhookData = await client.createWebhookNew(webhookOpts);\nconsole.log(webhookData);\n// {\n//   remoteSiteName: 'SW_Endpoint_9c680f2bb526a0fbdc34a2aef7e5',\n//   classNames: [\n//     'SW_SObjectFactory_3452ca73469dc9c2094f01',\n//     'SW_Callout_ae23bd24aa8c2abbc0c78db11e7f',\n//     'SW_CalloutMock_6a18a2dfa993157c6574bd7c',\n//     'SW_Test_85d9edee3617e831a7fbfe43cb30e084'\n//   ],\n//   triggerNames: [ 'SW_Trigger_b868fb7dbbcdea44930014e7a585' ]\n// }\n```\n\nIf you don't know the type of event at compile time, you can use the more\nflexible interface `createWebhook` which allows you to specify the type of event\nat runtime. The output of the following code is equivalent to the one in the\ncode above:\n\n```js\nconst client = new SalesforceClient(...);   // See the Instantiation section above.\nconst webhookOpts = {\n    endpointUrl: 'http://example.com',\n    sObjectType: 'Account',\n    secretToken: 'some secret arbitrary string',\n    event: 'new'\n};\nconst webhookData = await client.createWebhook(webhookOpts);\nconsole.log(webhookData);\n// {\n//   remoteSiteName: 'SW_Endpoint_9c680f2bb526a0fbdc34a2aef7e5',\n//   classNames: [\n//     'SW_SObjectFactory_3452ca73469dc9c2094f01',\n//     'SW_Callout_ae23bd24aa8c2abbc0c78db11e7f',\n//     'SW_CalloutMock_6a18a2dfa993157c6574bd7c',\n//     'SW_Test_85d9edee3617e831a7fbfe43cb30e084'\n//   ],\n//   triggerNames: [ 'SW_Trigger_b868fb7dbbcdea44930014e7a585' ]\n// }\n```\n\nThe information returned by these methods is required whenever you wish to\ndelete the resources created by them.\n\n#### Webhook Deletion\n\nAs mentioned in the [previous section](webhook-creation), after creating a\nwebhook the call returns useful data that can be used to delete all the\nresources created before.\n\nSo after creating a webhook, we can do this to delete it:\n\n```js\nawait client.deleteWebhook(webhookData);\n```\n\n## Additional Context\n\nThe concept of webhooks in Salesforce is a bit blurry: they do not exist\nexplicitly, but the platform provides enough building blocks for developers to\nimplement them.\n\n### Apex\n\nThis section _briefly_ describes the **Lightning Platform** aspects that this\npackage leverages to implement webhooks in Salesforce. In a nutshell:\n\n- Salesforce has a runtime environment within the platform (called **Lightning\n  Platform**) in which developers can compile, test, deploy and execute\n  arbitrary code. This code is written in a special programming language called\n  [**Apex**](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dev_guide.htm)\n- Apex is a strongly-typed object-oriented programming language whose main\n  building blocks are\n  [_classes_](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes.htm?search_text=triggerable)\n  and\n  [_triggers_](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm?search_text=triggerable):\n  - **Classes** share the similar semantics as any other object-oriented\n    programming language in the sense that they offer inheritance,\n    encapsulation and polymorphism.\n  - **Triggers** are a particular kind of program that _reacts_ (or gets\n    triggered) by a predetermined set of events (e.g. whenever a new account\n    is created, or when some contact information is updated). They can\n    describe arbitrary logic, however it is usually encouraged to keep such\n    logic as simple/thin as possible (think _controllers_ in the MVC model).\n- Apex code can be operated under the usual development cycle where code is\n  developed locally, compile and tested in the environment, and deployed.\n  Depending on the type of environment in which the developer works, there are\n  certain requirements that the code must meet in order to make it to production:\n  - For **production organizations**, tests are mandatory and they must\n    succeed in order for the code to be deployed. Also, overall test coverage\n    cannot drop below 75%, so if the new code causes the overall test coverage\n    to go below that threshold it won't get deployed.\n  - For **developer** or **sandbox** organizations, code just needs to\n    compile.\n- In order for code to make HTTP calls to 3rd party URL's (i.e. the usual\n  webhook case), the organization must be explicitly configured to \"whitelist\"\n  such URL's. This is called [**Remote Site\n  Setting**](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_remote_site_settings.htm).\n\n### Approach\n\nUnder the hood, this package performs the following actions when creating a\nwebhook:\n\n1. Creates a **Remote Site Setting** for the provided endpoint URL. This will\n   allow the Apex code to make HTTP calls to such endpoint.\n2. Deploys some supporting Apex classes that do not depend on the input\n   parameters (e.g. mocking class, factory class, the [HTTP\n   callout](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts.htm),\n   etc.)\n3. Based on the **event type** and **SObject type** parameters, a customized\n   trigger is deployed that will get called whenever such an event happens to\n   the specified SObject type. This trigger will get executed and will make an\n   HTTP call to the provided endpoint URL. Please note that for a single event\n   on an SObject instance, _multiple triggers_ can be executed, depending on the\n   currently deployed Apex triggers. **If you creat multiple webhooks with the\n   same parameters, their endpoint will receive as many HTTP calls as the number\n   of equivalent webhooks**.\n\nUpon successful creation of a webhook, the package returns an object with\ninformation relative to all the entities created above. This information must be\nstored for future use whenever users which to clean-up those resources. **The\npackage itself does not keep track of those resources after the call to\n`createWebhook*` completes**.\n\nFor deletion, the same steps described above is performed in _reverse_ order,\nexcept that instead of creating those resources, they are removed.\n","readmeFilename":"README.md"}