{"_id":"imgix-management-js","_rev":"43-c673d7414ed99e4867a4f9d4305d6de6","name":"imgix-management-js","dist-tags":{"alpha":"1.1.0-alpha.2","beta":"1.2.1-beta.4","next":"1.3.1-rc.1","latest":"1.3.1"},"versions":{"0.1.0":{"name":"imgix-management-js","version":"0.1.0","keywords":["imgix","api","javascript"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@0.1.0","maintainers":[{"name":"imgix-company","email":"developers@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"258ee019072f8874ae68c3b4def807d92f106a39","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-0.1.0.tgz","fileCount":16,"integrity":"sha512-W3Ry0Fxo3Xi9pqjuErts7vB0EEFDvdl/tosDkNWJPFQRIGrEPphUEIDFPxosWDD1Bhx3aFJFtYOAcMKaDJ/bew==","signatures":[{"sig":"MEYCIQChyYw/X21DkchC8WcRe7up3QvL8p5YQvaNpfPGS9KwuAIhAJS8uKFT+l6mhqENbHMubY5CVJFjAiVV6TtGbwJhLGa0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1UcJCRA9TVsSAnZWagAAYo0P/AzElwkIwXprm0q9cC6P\nTr2BjaAzjKvC1Y6t6Hj1Y1mEIQBQLSygbmTIkKlVQ0kPttE4uLtbsC0w2cxN\n7yC9Pyq+SA+dAF790cFVwQxmkys6E2hDDWRQePWYsGnF+w30XVWOy3R9z/jy\n8e0OQ/DxWCM+2JHBKKgWD8KXa5PHlXz3JaJMphfFeU0+e807/FxNfyYdL6Ho\nkSOkasHJXJZ43buBCnIueN1BmMkC86cP7tcU1KR4arpfis59ALi4GCysiYdc\n3tVYHz3M54MYaHuKZtuxo3lRpA2ylNsP9fwxNs/g6H/jd4HY6ZibnyJVr0Cu\n554rBtNxDbS8fTw1XVLrVd5fB0tWCOUSvEShZzC3Plda4CbWwSLddjcEO7dX\ndA9LnPvWBzeUNzFADBzeZuSqvcoWuT0cXdCzQJ8K/RPfHiAFPWTsLGNBy3gG\nx3ff76PVmtmA5K1Z5DdDF1pFxztWLWmZlqWD/V0CHyedKISNOItK+j3dzibF\nArU2Vuce/MVS+uJkPHDj7GJJI47U0oFa4JSEAXK4+h7zJnTPN3yqvONOMVcu\nSU16F6kXfS5zh/nEgE1GY9pHAdPTGFiXx4d62DCCqh7qa1jvoQx3UaEMbKo2\nLEKVm3UJAXHHyJdzNiULBj3YHbElzuXDWEXAEuq17ZiN8Oty8iP6HmcPaIfh\n1DK9\r\n=aIpA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"9b8da4bdc7178e330124367a7331e8da0acb3f04","scripts":{"test":"mocha","pretty":"prettier --write '{src,test}/**/*.js'","test:watch":"mocha --watch"},"_npmUser":{"name":"imgix-company","email":"developers@imgix.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"6.14.4","description":"A Javascript library that wraps the imgix public API","directories":{},"_nodeVersion":"12.16.2","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","mocha":"7.2.0","sinon":"9.0.2","prettier":"2.0.5"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_0.1.0_1591035656967_0.42407859038557616","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"imgix-management-js","version":"0.1.1","keywords":["imgix","api","javascript"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@0.1.1","maintainers":[{"name":"imgix-company","email":"developers@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"cce8f023296bb3bb8f7fe7dd5144561dfcb4fe79","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-0.1.1.tgz","fileCount":9,"integrity":"sha512-swkL0oMGRBJ9vdvXtTu5YtAPqVIP3Pntepg3B7Z02sEbAbFNFc/JYYrJVBHlmgOfeWwwXe9io/JAKyopxtgs5g==","signatures":[{"sig":"MEYCIQCZTpZEFfbtZgfKswE5i7odwosGjBqIncgMmbpaka3qdgIhAIIO1BReoiQinQiT0SbGmb0i6wQjRw9YWcckqkFqcuH3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12930,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1Xx2CRA9TVsSAnZWagAAll0P/1yw1/5m7iyn+ICVBmIr\nk84BY9RhFlpufIZ+HAQBqPoedpySFWim2vlOgwqmV7REy8M6p3FuqU3+XXuQ\nEkeM/BK0+1juFNenyTWlPGqlSay30zCXZDqKr7Z4bNoYBuhMhrytkQdmcRkB\nQXVE15i+YvbBEmkNj5zgB6L9LIQk/wqU0w9Vr+ld/azKyLtv6VeqfT77AR9i\nE2HtdxeP/QdqCrYJ863/OScG24qQvhKSYtyfXMI1YqcSMyhEC3gEmHS9gBzn\ngBiLcsJkm9zjtfcRYAT7FotZ4UINGTu6FREuULhOJ05I8lpdqECMpzSX+n84\nHhWJGtmkM7MNfzxyEQdmDMkXTWWAI5QKRE18tNh9zdkx/yOqj0GFSuhKIekL\nwau+fjiNoEDmRmuRzvUpiTfCdkSK07ve2UaUy/zxfotwhJM3fpF/q7TrgDZQ\nn6KMRxw0rcssCrZQKi42hCxylfK5J77a5NOhXOp58BXPhRkckJUXUDFeigRu\n/WNeDuJBHDPajLXeBOgYzp9TP71V6PZkJ3YjvjwdkB70crktv/TCbZIXlumH\nDOtTCt/lbOQOh0Jfi/8B5dtjMIz8+2bL3bFcRaKzI3owfx3qMqmZHYzyVuZB\noQzQa7k6aa4SsXYQvKzmu04A7Sb8IsjYuuX7oxun+BKQ9cYC3G6wxmko0I01\neHY4\r\n=tlqi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","gitHead":"911e65834740e87f9c9b762a3213881fa2f89d81","scripts":{"test":"mocha","pretty":"prettier --write '{src,test}/**/*.js'","test:watch":"mocha --watch"},"_npmUser":{"name":"imgix-company","email":"developers@imgix.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"6.14.4","description":"A Javascript library that wraps the imgix public API","directories":{},"_nodeVersion":"12.16.2","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","mocha":"7.2.0","sinon":"9.0.2","prettier":"2.0.5"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_0.1.1_1591049333612_0.9922962383166962","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"imgix-management-js","version":"0.1.2","keywords":["imgix","api","javascript"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@0.1.2","maintainers":[{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"jayeb","email":"eberle.jason@gmail.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"79ea3542152abc8c4f93d6ff2b4f6ec3e4527f97","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-0.1.2.tgz","fileCount":9,"integrity":"sha512-pgEmbFfb31SZT6y0c9OSC4qwGbrfFyZ4V6NI5PeSLlST65qK9cuQo994yrdsX4hWrwfKgauq/D4GyNJrp1jsLw==","signatures":[{"sig":"MEUCIQDIZvSOLp2Dq+SRW/nklN0kQ7L9LZiRB76s6AQH/DwH8AIgFmfeoZ0ZCc+MtmLQceMZHekWuuexA9M6/pPlTnoku1o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13749,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe1q0+CRA9TVsSAnZWagAAFfgQAI9tP+FYdTCiCOb/LaK4\nCVJ9W6ycJLzYBPYxN8U7ojHH6w0JBD0Ce0AwqhHI2+R8t4ecdINZDbGKzv0l\n91ap7Tnt4z9jTBBTBHVM8H8oWs1Ra+mLqJI0ka0dHaBQoRyI0QnI3KDZMAgT\nLhOYn1TTwXX8c91Mi4GQAEeV8ztabJA7vHRm3k60/2IvkHyIJSI2adehX0kB\nbXaH2YPMIXVsP9KC8zcp2MukckOa1X5uo6HM4BHjxojJvO4EcRHXZGIRPqEB\n1eMJj4Ti+lLjfrNlQLXQJz/O3CfZe80DGDxCSCle8H+LvD11wmEzsFMPdVV0\nRWF2xTDsM46WQIeOHpyz7WukwCx54mr1CHWY1PTqLSqvOjdib5Yu1BObgBse\ndlFonUy4hGj8rKFkiVgLhq/bTb1FiIM5bIOiipJQZqJPsM557b1hLJqcwBCP\nYtM1jKLpWJrRCugBBzppgKPXfAlkj2WALzi0jqzEij6XMjYmMc8EYShZjFC0\nfOtUaBOJK+9cuwCuQq3Pm1mQCQdgbpCI9DiHqbOquHSxSDYCnklMeV2Ya6U4\nKO26d3nS9/xsl9ZsBf2R2ZPx44QWoeDTW0mMRKBmoOlTFT8T50Ld4zlNE9Bd\nGGAET7GjQBsX85KuW57Hf6vW4QKW0qO6qbTDhhpcrj/RV8EVd0BVznJNmalS\nG/ae\r\n=X7ap\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","gitHead":"c5cc6d7c28cdee5c36e8a05937a1083461387275","scripts":{"test":"mocha","pretty":"prettier --write '{src,test}/**/*.js'","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"6.14.4","description":"A Javascript library that wraps the imgix public API","directories":{},"_nodeVersion":"12.16.2","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","mocha":"7.2.0","sinon":"9.0.2","prettier":"2.0.5"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_0.1.2_1591127358060_0.7467793938728273","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"imgix-management-js","version":"0.2.0","keywords":["imgix","api","javascript"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@0.2.0","maintainers":[{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"48fc16cd9572e6d7f2c48f0790a02d6e1745b3b2","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-0.2.0.tgz","fileCount":9,"integrity":"sha512-AfxsA1ajaVlUy6MPGIYpLZlmsEZakCkLKeNgmO3XVr35gOYXBmIpEvbo6vUIICsh3/eXa/ZAfFDHVDMKCTfmxQ==","signatures":[{"sig":"MEUCIQDEiVLV4502qoZQIoMnTq4P/xxgT857/6Bup37yW3VEPQIgdOXEYdtAmJJavkU7HgH7myGCJoMHa+uBMpCQoG4C4VM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15330,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKxOVCRA9TVsSAnZWagAAW9AP/3N8bUM01oggboJW+s6q\n7SrR8sWthYyeoFYl5ltfPRXj8YpEv8uAmgb120HaIMCLCqNmo6rRwJwI7pOu\nSqU3lLzzeHlCuVV26WDJ0T/lIKE+ogiGXxtHPbDrjQULHS4qfspc5vCwEofY\n0fGa/ZpCjq1YaQb3wiFJs9pcajXYvliYuU9aeprlISb5J29pCSMbimvSTnd3\n5n7xLsfGmsV5w51IZTD7fIj+LP/g7GFFvRRO8jzCKYoj+xKHeNcDP1IDAph3\n+9u/oBvTvtXrG/waP0fqmeTxuIXMkWH5Fi8PyoyqZCA58UXOTVoVPiG0WFE2\npB4+xKY4Zm9ADmhYEoNq549dyoFi30t81oXKtWgVu2Q+UAXs4k60LUlPYaNp\nWRavQJSEm+4NNplCpVMn5Hd2qQdr93jqFKgNvFuK2YlVRgk7imyxfNfzS9/O\nupqi/mJdimyz51r7Muh3yAOKHP6ThSarGF0ubwv9k7CbQgURsdBkwn+R95QZ\nfyMhZBlz7BW5PZ9y9zpe26M+6HqK+tYwYLqkk8BbamizzBQtXdzASA0mugpQ\n3SeA0UjiEcDb3nUVYeKdAbtjvgjSAdxYv/dgBQQXsmWFG8GVXgxZbQuLlW6b\nteLuLa4lpZwQ8D8dd0Z1Ff7HhHNUxyZifJ1XGOsNBpztgRu8Gdr/EuPqOkRL\n0Cs8\r\n=x7IW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","gitHead":"d30131f027abfc2f4d0dadafce82d9056d5db96d","scripts":{"test":"mocha","pretty":"prettier --write '{src,test}/**/*.js'","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"6.14.4","description":"A Javascript library that wraps the imgix public API","directories":{},"_nodeVersion":"12.16.2","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","mocha":"8.1.1","sinon":"9.0.2","prettier":"2.0.5"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_0.2.0_1596658581306_0.36934592522304843","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"imgix-management-js","version":"1.0.0","keywords":["imgix","api","javascript"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.0.0","maintainers":[{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"2d61cb6427e9ef5e6353611257ad15bdf26ea09b","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.0.0.tgz","fileCount":9,"integrity":"sha512-IFjiwNe6+EzXL82R9p/G92hNDhz1v8I1iyLUXqJiiwsfqCnSNMSZoZTFcHXd9MrE/TJbwGyO8lpkjZKnVxNmxQ==","signatures":[{"sig":"MEQCIErrYgzUZNN4u8RBMGO+qaUDieMd4iMHnT5WkihfacEjAiAMZSsPNcFI5hb4qN9u9h/FsxQkPEMGfFiipJT+R3e1bw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKzBhCRA9TVsSAnZWagAA00EP/2M1Rk6y6KnN9XcsOdZk\npE69aw/0EIlbKVei+C9Orx4ZlZbkNMfF5WCinEnqMnL8f4AnWaD4OqgEqeGI\nHPBosI/bK5ersstz4CukQE2cO9g1330WS1LrDu2umpGQdXQYFMdXoACENlds\n4L5mSKtAsYiSW/7rpprVrrE5ctLa23pPn1maS+jpF9xtvs79og3eSdLsILNp\nsgRq9dygjbVn9ZSdn+M5NpZhTuTYrUcTz5bEKp92WJIxwHwUuhvdA6xiawdQ\nowsVHCbNnaD8VCb8c+R5Ipy75xP7md40OXvGCwai6aBfBIBkwKR73IGxQt8v\n1ikp8c+DGFwc/lxz1z9pLTuL6v58tl/R/oHpyx4xeFpNmwuWUfeF7tnvvvYn\nuG69l05PS41m9RZpYIBG4THHgxMmeGz4MS85cbputef5GuSYKM4ZIZkFz/Jp\nwv7w1iIEfJCoIekAQgvweU6FDop6zaG2C6Gin5NI08zmD97bY4JL3OFtbnZ0\n/K1dzPSbf2rZUeAYtTJOvehbS5VtP/iLIBn8ncs1nV+B9q5FogpnDfnFvBFC\ncz31qRL3rfcbO2O0W14e9xWOMK3DtQ+o0XLudLSxj+kLxWrL1GmLTHKx2FWh\nwaA9Csbgrv35hzhJVCg5e2RiT6ww6tU/n0fqYvVundMS/AL1sJbmCPrm+Jdn\n8SrW\r\n=fY2F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","gitHead":"699a004e66759cdaae8e3993911d0005fbe1d024","scripts":{"test":"mocha","pretty":"prettier --write '{src,test}/**/*.js'","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"6.14.4","description":"A Javascript library that wraps the imgix public API","directories":{},"_nodeVersion":"12.16.2","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","mocha":"8.1.1","sinon":"9.0.2","prettier":"2.0.5"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.0.0_1596665953384_0.4533516771596613","host":"s3://npm-registry-packages"}},"1.1.0-alpha.1":{"name":"imgix-management-js","version":"1.1.0-alpha.1","keywords":["imgix","api","javascript"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.1.0-alpha.1","maintainers":[{"name":"albertmejia","email":"albert@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"1754ced42b7f9fe7f193ce1ae4bfe248cf821c2b","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.1.0-alpha.1.tgz","fileCount":33,"integrity":"sha512-Ke8jc35ZEXlImBWWg7QXKvqYfNVO0vUIJyxWnk05nBDKs+r6WEI6lQrlBLUIZaDOzY4fpkJpF8jUdgEAXVdVTQ==","signatures":[{"sig":"MEYCIQCrY8sVv6RqBwiLF47Ww1sDL09Q+CfhAxp44+Y4886/NgIhANEmAImgVluYDpKSNdYOqnyEvLrv4fjE5AckShgk3kh0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfa5TbCRA9TVsSAnZWagAATBEP/0wxudzKNy+Rt8uTYCgE\ng5YIJ4XUi97evWP2L+OA9hDWRn+3Bm6JSf9BZPf7VapPm41jmC2NZPKwAVnj\nyCmc0nxhM65JminGwpbLS275ABZaUu+rR8rHjgYQpNcQxIey+4gh7vqJXtha\nb5GhGrCwPiUBlwwdu5zBKJ0Jx+yqXkdeK8IrlgjKsbhBPH0DwOfke0CL3vzn\nky12huJ6i8cLY0bP49JiZdRkUpHxuN0lpaAWK/kpG4PmnfISR/ipWoaExjou\nXq5hz/G+OKF+/UjbmZpvMlArrVxmKmrj8PS4kSXTyZaveGFMUzOEHHOBjuWw\n1YQ3aVr6xmlwc/jd4DPKIBWeJxt2G2jFaLUCu+6gHJdS1mzWzYTQd6UgcuxV\n9edkD9+UPf30J1ZFobDJZvxVTnBE+/wZ4Dy8WNyfe4+gKiQYeZbtRxTD0nUF\n81dfwBmN0MtArs1W4OEmpZT/7fHnSZiL3bJv2F2wA0QoGPQ+GAyv64RDnhmn\nTofB4rFgfE/A/lpXAcIcbGIVxVd/d6eG+UmYt7So6wNJhjctu3iuaQstmMGU\neOOtYug/SWyUgtzaSWoPxsSUU/CtQpm+LtiZ2QHxJg5JFts3kzeGqn1nj82U\nMEYvaW3sRBgD61xiELRIb6M0u9sXcdsvkM4Ei43L4E6QKBpM0pGsqZHhmTM0\nTQNQ\r\n=jUbZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","gitHead":"7874ddff5e57937c74adf33493ee598b93b24aaa","scripts":{"test":"mocha","pretty":"prettier --write '{src,test}/**/*.js'","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"6.14.4","description":"A Javascript library that wraps the imgix public API","directories":{},"_nodeVersion":"12.16.2","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","mocha":"8.1.3","sinon":"9.0.3","prettier":"2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.1.0-alpha.1_1600885978767_0.19738768565719478","host":"s3://npm-registry-packages"}},"1.1.0-alpha.2":{"name":"imgix-management-js","version":"1.1.0-alpha.2","keywords":["imgix","api","javascript"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.1.0-alpha.2","maintainers":[{"name":"albertmejia","email":"albert@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"c30fcf3311673eff980bfb2cac06d5729d007a69","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.1.0-alpha.2.tgz","fileCount":9,"integrity":"sha512-w5T0ZE5fpnqAlqC6bEelIM//G6uiiiT5+B3w8x7rRjHU2I/N4yrLbP4T4dwW2NLnC4aeKaQUPUFwyg0jaFnJ/w==","signatures":[{"sig":"MEUCIG370gH4EhCL+6n4ey2y8r/qjwCYxRWMQMtqV36I1ADMAiEAqgNAX9rzKyeBrj2G3hG4cZm9x4Sw++xE6TepoCoeIJk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17052,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbMirCRA9TVsSAnZWagAAlywP/2p2tIpjXSexxgY9Eg9r\nf5TP+b8FFTn7xYy/oDISc629PzAcv2mF2oZGhK6jHiYEW2Oq+mqm6Abz6bK8\neiY9h0F/64fDMLCEKHNXLLIm9AzAp43eXyr1RUzcVoClnxfa2Jc2xUV9uEoa\nvTFdoZ/uxWN9X2Wt6T7jdLFijp4DcudqgPGaxN3/L81jqcJEXwzGRC8GrExP\nDcQims0H63AVtRYJigq1qtahKoN60o2SFbto9Xu3bPcKs6MZ36Iywri+VZyK\nM+zPw6G2GOidX5xggz2V1eewIOn5KtYwmRB3Lmtzeq7knSVQbqsy89UkDwMl\ncwWSJ0vNhOzU07hNmg+XETU6HK4nXsMyPb1eVeR573R3T2ibV4AWrxPWxagQ\nJZhsNSiLVGGb+R0NI0BRrHQHPwsR/JDTeElvD/IxfNFEw6eGrhV42u7D7Tto\nxF9KLv1ofU0lxNKBrN0OX+7sNYHZ6nO/KP9lfJYZxIAleBrER52KpyPsT4ng\n7N0gc/k919utZdqeN+UT2t3Fo6srjkfhM6Zzi/W35lmHJ8I2GQvSrzT7RA/T\nijq3wdxG48s4sIkKlD3hUXQK8ioBYlYQnesYbWKjVXRGy7Iwwoe4Q8r6pqWH\nU5EEKm4idNm9sFPeM3ji3b+IYw/myt3OC5IKrmE3uHulHCqqUHQiHYeQfIsj\nV50O\r\n=leLD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","readme":"⚠️ **This library is currently marked as experimental. We plan to eventually integrate it as its own module in [`imgix-core-js`](https://github.com/imgix/imgix-core-js).**\n\n<!-- ix-docs-ignore -->\n\n![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)\n\n`imgix-management-js` is a JavaScript client library for making requests against the [imgix](https://www.imgix.com/) Management API.\n\n[![NPM Version](https://img.shields.io/npm/v/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Build Status](https://travis-ci.org/imgix/imgix-management-js.svg?branch=main)](https://travis-ci.org/imgix/imgix-management-js)\n[![Monthly Downloads](https://img.shields.io/npm/dm/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Minified Size](https://img.shields.io/bundlephobia/min/imgix-management-js)](https://bundlephobia.com/result?p=imgix-management-js)\n[![License](https://img.shields.io/github/license/imgix/imgix-management-js)](https://github.com/imgix/imgix-management-js/blob/main/LICENSE.md)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\n---\n\n<!-- /ix-docs-ignore -->\n\n- [Installation](#installation)\n    * [CommonJS](#commonjs)\n- [Configuration](#configuration)\n- [API](#api)\n    * [`ImgixAPI.request(path, options)`](#imgixapirequestpath-options)\n- [Usage Examples](#usage-examples)\n    * [Retrieve a list of images](#retrieve-a-list-of-images)\n    * [Retrieve all details for a single image](#retrieve-all-details-for-a-single-image)\n    * [Retrieve custom fields for a single image](#retrieve-custom-fields-for-a-single-image)\n    * [Update custom fields for a single image](#update-custom-fields-for-a-single-image)\n    * [Upload an image](#upload-an-image)\n    * [Retrieve all sources](#retrieve-all-sources)\n    * [Specify the fields returned](#specify-the-fields-returned)\n    * [Paging by page number and size](#paging-by-page-number-and-size)\n    * [Sorting lists of objects](#sorting-lists-of-objects)\n    * [Filtering lists of objects](#filtering-lists-of-objects)\n    * [Create an object](#create-an-object)\n\n## Installation\n\n`npm install imgix-management-js`\n\n`imgix-management-js` exposes a class `ImgixAPI`:\n\n### CommonJS\n\n```js\nconst ImgixAPI = require(\"imgix-management-js\");\n\nconst imgix = new ImgixAPI({\n    apiKey: `${yourApiKey}`\n});\n```\n\n## Configuration\n\nThe following options can be used when creating an instance of `ImgixAPI`:\n\n- `apiKey`: String, required. The token used to authenticate API requests.\n- `version`: Integer. The version of the API that will be requested against. Defaults to `1`.\n\n## API\n\n### `ImgixAPI.request(path, options)`\n\n- `path`: String, required. A partial path representing the relative URL endpoint to request. This will typically require a `sourceId`.\n- `options`: Object. Any custom HTTP(S) settings to be applied to a request.\n    * `method`: String, required. The request [method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods), defaults to 'GET'.\n    * `headers`: Object. Additional [information](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) included with a request.\n    * `body`: Object, String, or Buffer. A resource, such as binary data or a file, included with the request.\n\nMakes a request against the specified imgix Management API endpoint.\n\n**Returns**: `Promise<[Response]>`\n\nThe supplied `path` should be a relative URL, such as `assets/{sourceId}`. Using this path, the full API URL will be constructed at the time that the request is made, saving users the need to provide the full URL themselves each time.\n\n`ImgixAPI` will intelligently populate any necessary headers prior to completing the request. This includes fields such as `Content-Type` and `Authorization`. Outside of that, the `options` argument can be used to override certain defaults, such as the HTTP request method, or provide a file for uploading.\n\n## Usage Examples\n\n### Retrieve a list of images\n\n```js\nimgix.request(`assets/${sourceId}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all details for a single image\n\n```js\nimgix.request(`assets/${sourceId}/${originPath}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve custom fields for a single image\n\n```js\nvar customFields;\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    customFields = response.data.attributes.customFields;\n    console.log(customFields);\n});\n```\n\n### Update custom fields for a single image\n\n```js\nvar document = {\n    'data': {\n        'id': `${sourceId}/uploads/pecanpie.jpg`,\n        'type': 'assets',\n        'attributes': {}\n    }\n};\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    /*\n    ** Populate `document` with all pre-existing fields\n    ** so as to not overwrite them when sending a PATCH request\n    */\n    document.data.attributes.custom_fields = response.data.attributes.custom_fields;\n    document.data.attributes.custom_fields.type = 'dessert';\n\n    // PATCH request to write in new custom field\n    imgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`, {\n        method: 'PATCH',\n        body: document\n    })\n    .then(response => console.log(response.data.attributes))\n})\n```\n\n### Upload an image\n\n```js\nconst data = fs.readFileSync('./src/monstera.jpg');\n\nimgix.request(`sources/upload/${sourceId}/monstera.jpg`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all sources\n\n```js\nimgix.request(`sources`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Specify the fields returned\n\n```js\n// To request a deeply-nested field, use dot notation\n\nimgix.request(`sources/${sourceId}?fields[sources]=name,deployment_status,deployment.default_params`)\n.then(resp => console.log(resp));\n```\n\n### Paging by page number and size\n\n```js\nimgix.request(`assets/${sourceId}?page[number]=0&page[size]=1`)\n.then(resp => console.log(resp))\n```\n\n### Sorting lists of objects\n\n```js\n// To sort a field in descending order, prepend a dash “-” to the field name.\n\nimgix.request('sources?sort=name&fields[sources]=name')\n.then(resp => console.log(resp))\n```\n\n### Filtering lists of objects\n\n```js\nimgix.request('sources?filter[name]=staging&filter[deployment.type]=s3')\n.then(resp => console.log(resp))\n```\n\n### Create an object\n\n```js\nvar data = {\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"New Web Folder Source\",\n      \"deployment\": {\n        \"type\": \"webfolder\",\n        \"webfolder_base_url\": \"https://my-domain.com/images/\",\n        \"imgix_subdomains\": [\n          \"my-unique-imgix-subdomain\"\n        ]\n      }\n    },\n    \"type\": \"sources\"\n  },\n  \"jsonapi\": {\n    \"version\": \"1.0\"\n  }\n}\n\nimgix.request(`sources`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n","gitHead":"5a0cf3aa01a8c815ba3e813368aaabcf367698a0","scripts":{"test":"mocha","pretty":"prettier --write '{src,test}/**/*.js'","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"6.14.6","description":"A Javascript library that wraps the imgix public API","directories":{},"_nodeVersion":"12.18.3","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","mocha":"8.1.3","sinon":"9.0.3","prettier":"2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.1.0-alpha.2_1600964778972_0.8857341411094803","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"imgix-management-js","version":"1.1.0","keywords":["imgix","api","javascript"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.1.0","maintainers":[{"name":"albertmejia","email":"albert@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"d3ae30c1118c6c1acd27f8eedcd37649a4f2e9f5","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.1.0.tgz","fileCount":9,"integrity":"sha512-dtdTVMC2mnMzTnRcvc3p7NWCBHgNKoMqpkbH24Hntj+8xY5kUFtCPvAw33qw0hD4QU97nZKoZNP7vs5PdpWDnw==","signatures":[{"sig":"MEQCIEWrNBa5BOeuk6dz8A4PgiauuSdcn4du3uh6VPJaP/p8AiBeHT40xuwe326K+j6LgEzdWmQ/dWodApeTmrk1Igg+Hw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfbQwICRA9TVsSAnZWagAAh4cP+wY2XG+Qy28W2rIDGiTJ\nXp954n5pwrE307iYtUISS2b/+O73IuV/pWWgzOVPVpb0vD52S8v3E85/flC4\nsSgKxSUWtRaJZ+ylzy+seN/zReGysFuWv7AtrevlLNR0IuGekuWXPsMGCfYy\n2Ovhie5Gr+o2vJEbLS/0TLnrB2TOWcSEQRfGMSOGpuj/huCzO3ivNjgXN8Ee\nAJJV5XWhoOTudZy41KzYB8WmU+4BA/bDHcIqQD5GTq9x35N+ZERqLX9gp9Xn\nT8a8mDCAtnjc0kxyADxi3/NvJuLi8Z7Mdjn6BVNk7nUu0RDARayYM8kpRiXL\nPpdoK2o5rfJohv5fyFurIuSFHUZXVstndA5GbIroJkkR6XnUEbc8MFok0edQ\nVFa/378yinFvNDoJN0OHrIiKHOVfvq91g/Q6cgDDjMno7S3A94LUOPraN+k7\nkloERxrDyIWJa2xMuupnvawfrmp64Y18o7tjt6f2lU6Z7kHt3hBBo4srL5/L\n/zVS3upTGskBaCieHsOC+HIOR0TYDvYwudvicbzD2M3hzaggAPshJXnlsx+c\nLcV94Q2HtdiBWFejJzhMnPpXp68yBRHf7wTCs6TVlFTi2zN/groeSmK+mgjf\nzKDwkZsWAfZAuNxMSuVr4l9ra+BC+tZWMp7QQ2hlCfJIJr0m+Mt51Nj1+Gwm\nR1Gv\r\n=04T4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","gitHead":"08c6e8ec0af1fcb26c9692b013d8e811c001fd00","scripts":{"test":"mocha","pretty":"prettier --write '{src,test}/**/*.js'","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"6.14.6","description":"A Javascript library that wraps the imgix public API","directories":{},"_nodeVersion":"12.18.3","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.2.0","mocha":"8.1.3","sinon":"9.0.3","prettier":"2.1.2"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.1.0_1600982023658_0.2457230547842555","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"imgix-management-js","version":"1.2.0","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.2.0","maintainers":[{"name":"lball","email":"lball@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"df6805d310b3e4ec123c3d56de48106362656e9a","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.2.0.tgz","fileCount":14,"integrity":"sha512-6dknLbdHlmAvkHy8Lt15LsJncvjm5VH98rY3D0UJjWzWdaz51c+xjln4cxZM78bY8aTnuvjpHb6ifYnmdOXLwg==","signatures":[{"sig":"MEUCIQDLPWNexLAFJleu2LM3fbJbygQUOzvbe4deKCJWh+QSawIgMVViT++yMP34ZvnwiVHkE8rDBMrRey+3xBsEjcgVkPE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXmmFCRA9TVsSAnZWagAAowcP/jnFhbWi6TUkuT6L3X/y\nZ8PFjmBS35rr+Iwm+9giDfAzl+eTAKnNl/2M4s+7zJBJsjmFzu1iJl+Eeo8B\nhiVSTppJz2obk+Od/xLZ7ZaPIegVO9DMq37N929aNb73W1IvxMlTXY/VKwof\nXAFmU4HVpCd/Zhrk8tm7/yV5T+iyhKmXU19GDFoG+zs9po9H2ooQ8P5I0THl\n07od0JrjeIGgy8+8InkjvS+6FMPC5tSQTxJSLwIBXRtkyF1ujLONssd2yirQ\n5KkeHt/RIkdn7uOuUwZDA7gdfJGPVG94qxAUEsh3I+26S8j50Ft5cN0UIL6U\nyazrLXfdYbd9LOkx4sM1na4Z2jaJ/6cqXAhTr4Qvput8ptyeYtNGR5n8zjVj\nwVTVlfXvSEcrO9hT87lnGc0EniYfTj9+X42UDSvppYmXFI4W7N0tLGzJ/FT5\nrwJY+UAzQeNggU2kXr6mrk+5o0x0otsX7cFHjr0qBw/3I2omqobQv6ssiO1C\nRVezjuC3J3u5Ldwgc3Hw2SGoMVnR2ZBAgI624HhspFqUzi3n7yo09t6ofREO\ncCjN274U5/2iHx6nysmDclWivWcCI7+z5k6ZOxvp8FtypYDcnpBiGTMxzYZ1\nD8SGrEDR5m6K5Uc6+BN3zYigYTYcgA4PriD/XnhqsdqifCybf7OPLCdU+6mC\n3uPA\r\n=O0wp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","gitHead":"94f5823bc45f1a6db87bd0a1ee7a6522d8178d93","scripts":{"lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run dtslint","dtslint":"dtslint types","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"7.7.4","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"14.15.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.3.4","mocha":"8.3.2","sinon":"10.0.0","dtslint":"4.0.8","prettier":"2.2.1","@types/node-fetch":"2.5.8"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.2.0_1616800132562_0.04267837845228817","host":"s3://npm-registry-packages"}},"1.2.1-rc.1":{"name":"imgix-management-js","version":"1.2.1-rc.1","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.2.1-rc.1","maintainers":[{"name":"lball","email":"lball@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"1fa1573ebb84c6f9f274d11037585f6965a09b45","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.2.1-rc.1.tgz","fileCount":14,"integrity":"sha512-LaChIP9Ype2lv0+wbgHimiiLIJDkEo6KzNH7iC+ycwrRjC2rBpZOlfSSjzKnC4He/OEs5Q1/BCzZxbeHSa/c+g==","signatures":[{"sig":"MEQCIA0yhhoh5N/Wz4QqniTLPqiUA0AK7FjiMJW18N05N+jFAiBFK21C4mMKGdW/cq/No+yK+ryuX72FBqnB/HgWNfC2vA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":21855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbj56CRA9TVsSAnZWagAArmUQAKS+GcYtO1JPEEM2kv99\ndFoVo0Tli/yOcwISovFO1WkopWmQw/O9MSb6Tf7TW5c7eID3F5Fuq3Bm0PnJ\n0PkTLjyxIWBQxl/g4D0hJBN20zHYu3JQY3GKCKm3Ku5AnzSz2yIe6QTOenVX\nbNezzrXxUUFOrF1pEj2MCWb1nwGNbRq5VdPeB04pFpmAZbd0fTGNLwoaLb/0\ntwrBMSYUkuLrb80MZLJq39ep/oCtGhlDOnll7NcqMX12T2cHC+kUBx9RKgdw\nzCkdVfIxYlsPV8aZHkIh8QFVEzQJJEnPrny9UMe33dk7gvLzcv85iw/gsZU7\ncOtTcso1CgBJguOzt9eoIheMdGq4V7sp0iMHs7xZrlTqRjgEkGwraJ7aV3C8\n8cMhbq4BrDKm4XpHyBpPpMLXIfTdKCgsZ3NOxLXCTWwX6RyZua0uWLysjdqp\nqaJbc6LrduMMChWMy/21BGfLvXYr3uLWdPV0Tsv0nDsNif37gKZF+1hPDK5I\n8277Ct7wv0/kMYs8rfHlT/+daCHOCYP2hpuMR3NVTI4/TlXAgN+r8f3IBPj/\nZzcOgeBZBNQPM7S/4rQKqfkm0OY24iw5aVIphzf2qwnuYQFVrWIDrusnPskb\nQ5LU1z3GhBVbjpgU218UOeW2wQhL6LXrs8Qp56b3SGrlvkIVH5D5hU5Ki3jx\nQQ7v\r\n=mTFE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","gitHead":"5c20b1632395c0e79b4197dbe1bc42a337aab37b","scripts":{"lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run dtslint","dtslint":"dtslint types","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"7.7.4","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"14.15.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.3.4","mocha":"8.3.2","sinon":"10.0.0","dtslint":"4.0.8","prettier":"2.2.1","@types/node-fetch":"2.5.8"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.2.1-rc.1_1617837689676_0.702413968350613","host":"s3://npm-registry-packages"}},"1.2.1-beta.1":{"name":"imgix-management-js","version":"1.2.1-beta.1","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.2.1-beta.1","maintainers":[{"name":"lball","email":"lball@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"7953321b69361968b7d5c0511a8d38481c6aed9a","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.2.1-beta.1.tgz","fileCount":14,"integrity":"sha512-Ah6Pcz/hnZSbyWkH/d+exx/9Xz0bJcHjt8kzty9hv6jxK0w2j5f1eWtZJJNUEDfmZ7dETy+qbGz57U28YthhRw==","signatures":[{"sig":"MEYCIQCMmcvkX0QP90NtQuF8ArBC3YgInJKQVYlcy9hD0XF2LwIhANA6fDC2d35SuTOzf4N6YgMkLZ74K1JntbAxTQLmmyRg","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcKovCRA9TVsSAnZWagAAueUQAJPh0vRTcRqai59jRICU\nu5bKIJWgFU9bvcRZzorzRizri+Rgu4ueauJ6qAB06hUOm168KG0dEXBi8MGT\nRJbtY8E6iD2j5avUYl/oyflFmrQnlIJiqbvBYU4ulk5xayIBdiwWkHDb+EF8\npyqEeWRnuDwYcWzIpIiMfytD/gC2dSAZsug2kSS5WH8YjURKxn71F9ZDkV6y\nhj4ioI1yQLAaA5ZRrtr4bawDW8OVl1VaRMMpZT9KNGUPO7jxjfQyTDIItndA\n8soPukOmtyMpEoChQ9lsnM0X6pBAAfdQXqzwTtk/yj7JZLWCqpWk+gb0wOS5\ncoebg/lBCVpxw5nv2mLARN6qdxr7TxpcwiSYlCyQsGxX2MXZtc6AyUUf1iqd\nOYXHvL6CMi9A+g5SOZcNDLngoEImSVOrQF4fbNU66xawrhg/jTYvGBYERc14\nC2aj1i1x7vQ/vDUVTc2qqMrpxm9RtoAkaIX7lmddABC2MkkfuLzIhlaXI8Tf\nC/viDhsTrl6PRzCCJfVk6O1oUbeZawXTiso6DHzIyzGMnNeN5trkyFXknvSV\nUbuLSThm9wnrk6duwQQ0aQqxgQgJTQRkOu1KV+HEebPhYA6FavKSS16RuZkV\nf9PXKBiU3YZ9LpOHxqAuQ44AjQeeWldGdpiesg7tfwolhVPNJhpt09rcZmpj\nkVS5\r\n=ejAa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","gitHead":"8573b7464f5b99e408ffea473ab4db6c19768050","scripts":{"lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run dtslint","dtslint":"dtslint types","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"7.7.4","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"14.15.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.3.4","mocha":"8.3.2","sinon":"10.0.0","dtslint":"4.0.8","prettier":"2.2.1","@types/node-fetch":"2.5.8"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.2.1-beta.1_1617996335089_0.5962056362786592","host":"s3://npm-registry-packages"}},"1.2.1-beta.2":{"name":"imgix-management-js","version":"1.2.1-beta.2","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.2.1-beta.2","maintainers":[{"name":"lball","email":"lball@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"229ec662d3d8660a4702ceaedad1b390b909449d","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.2.1-beta.2.tgz","fileCount":14,"integrity":"sha512-T/8c0mVfgL3wdGXXyQXQs6tBuB78lwkIfnJv7t5FIQu4WjPvYAnwOT6qm3tCs59M+WIrCsgxmpGQk0bZc4p4XQ==","signatures":[{"sig":"MEYCIQDFyw/+jTn24Q05vFphKe9kR0VU29uTwpW/5LySiSlieQIhAMvuzmSybPE1MqNoBQm3zC0PliVawpQQ3Vwx2lm0JG9e","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22497,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgddJoCRA9TVsSAnZWagAAbMEQAJBus3asEWRtFfywo1LS\njR1bS5aflrb3LlB9CYscp0PeySJg8nBoMbDkC9f25dxxqvCJkkOvoOCfsFgJ\n+9oUsw5Pny3zdj08Hi7Jzu8UD/YKnIIIB9MYjP1TYVnLvQGl/WX7MLuEdz+O\nZouzA+ab/uILS1C6u+QLnUg7ryP4eXKJ0p0WLVI8wkIfrtAFsrUT/yX+5BmR\n+C7uZ1Sn2/LXysvkMB2sRYmch2w9leAGEX/lb1DjhyEmG4f3NHTFqH2mfyWu\nz/dIAL+cy+RNVgsqb8aHji0pLPMART3x2NmPIAArY1hQDndLRpdd9jiAAh9B\nAbpem4P9VtMtMpaC70itKfYO41RjtNabXi+s7c3w+zZzRMOpKp63aNkg4/rV\nQQYqopUcGHZLdvk2WMnIBsBVKbaTlRGB3AmwZjqvTx4Za8qGzOclpGAq0d61\nsBHllysmkq1SRWNsvZPtu+f6gre4LPzice4fdGp1dLVMv+IFu+w6XE1pBogu\nTpd2ejII1N0EJUzVE3kv9vNx5cab5SG5KpWHvW9eYCqRK3SF5DrV2/9wrlWj\nd3Il+9ph4wHS/cKr2oLcvoUyxVV/sj9niKcRIHTWL5C256OkW3pDs0MWrq2X\neMG3GqTFxqzwEKgCSXuq6pZdvXLnqiD954ZIPfN0ltK61pnt8S8o3nsdi9jR\nFuOo\r\n=1wml\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","readme":"⚠️ **This library is currently marked as experimental. We plan to eventually integrate it as its own module in [`imgix-core-js`](https://github.com/imgix/imgix-core-js).**\n\n<!-- ix-docs-ignore -->\n\n![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)\n\n`imgix-management-js` is a JavaScript client library for making requests against the [imgix](https://www.imgix.com/) Management API.\n\n[![NPM Version](https://img.shields.io/npm/v/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Build Status](https://travis-ci.org/imgix/imgix-management-js.svg?branch=main)](https://travis-ci.org/imgix/imgix-management-js)\n[![Monthly Downloads](https://img.shields.io/npm/dm/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Minified Size](https://img.shields.io/bundlephobia/min/imgix-management-js)](https://bundlephobia.com/result?p=imgix-management-js)\n[![License](https://img.shields.io/github/license/imgix/imgix-management-js)](https://github.com/imgix/imgix-management-js/blob/main/LICENSE.md)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_shield)\n\n---\n\n<!-- /ix-docs-ignore -->\n\n- [Installation](#installation)\n    * [CommonJS](#commonjs)\n- [Configuration](#configuration)\n- [API](#api)\n    * [`ImgixAPI.request(path, options)`](#imgixapirequestpath-options)\n- [Usage Examples](#usage-examples)\n    * [Retrieve a list of images](#retrieve-a-list-of-images)\n    * [Retrieve all details for a single image](#retrieve-all-details-for-a-single-image)\n    * [Retrieve custom fields for a single image](#retrieve-custom-fields-for-a-single-image)\n    * [Update custom fields for a single image](#update-custom-fields-for-a-single-image)\n    * [Upload an image](#upload-an-image)\n    * [Retrieve all sources](#retrieve-all-sources)\n    * [Specify the fields returned](#specify-the-fields-returned)\n    * [Paging by page number and size](#paging-by-page-number-and-size)\n    * [Sorting lists of objects](#sorting-lists-of-objects)\n    * [Filtering lists of objects](#filtering-lists-of-objects)\n    * [Create an object](#create-an-object)\n- [License](#license)\n\n## Installation\n\n`npm install imgix-management-js`\n\n`imgix-management-js` exposes a class `ImgixAPI`:\n\n### CommonJS\n\n```js\nconst ImgixAPI = require(\"imgix-management-js\");\n\nconst imgix = new ImgixAPI({\n    apiKey: `${yourApiKey}`\n});\n```\n\n## Configuration\n\nThe following options can be used when creating an instance of `ImgixAPI`:\n\n- `apiKey`: String, required. The token used to authenticate API requests.\n- `version`: Integer. The version of the API that will be requested against. Defaults to `1`.\n\n## API\n\n### `ImgixAPI.request(path, options)`\n\n- `path`: String, required. A partial path representing the relative URL endpoint to request. This will typically require a `sourceId`.\n- `options`: Object. Any custom HTTP(S) settings to be applied to a request.\n    * `method`: String, required. The request [method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods), defaults to 'GET'.\n    * `headers`: Object. Additional [information](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) included with a request.\n    * `body`: Object, String, or Buffer. A resource, such as binary data or a file, included with the request.\n\nMakes a request against the specified imgix Management API endpoint.\n\n**Returns**: `Promise<[Response]>`\n\nThe supplied `path` should be a relative URL, such as `assets/{sourceId}`. Using this path, the full API URL will be constructed at the time that the request is made, saving users the need to provide the full URL themselves each time.\n\n`ImgixAPI` will intelligently populate any necessary headers prior to completing the request. This includes fields such as `Content-Type` and `Authorization`. Outside of that, the `options` argument can be used to override certain defaults, such as the HTTP request method, or provide a file for uploading.\n\n## Usage Examples\n\nThe following sections demonstrate how to use this library to make API requests for common use cases. For a full list of endpoints and operations, see the [management API docs](https://docs.imgix.com/apis/management).\n\n### Retrieve a list of images\n\n```js\nimgix.request(`assets/${sourceId}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all details for a single image\n\n```js\nimgix.request(`assets/${sourceId}/${originPath}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve custom fields for a single image\n\n```js\nvar customFields;\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    customFields = response.data.attributes.customFields;\n    console.log(customFields);\n});\n```\n\n### Update custom fields for a single image\n\n```js\nvar document = {\n    'data': {\n        'id': `${sourceId}/uploads/pecanpie.jpg`,\n        'type': 'assets',\n        'attributes': {}\n    }\n};\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    /*\n    ** Populate `document` with all pre-existing fields\n    ** so as to not overwrite them when sending a PATCH request\n    */\n    document.data.attributes.custom_fields = response.data.attributes.custom_fields;\n    document.data.attributes.custom_fields.type = 'dessert';\n\n    // PATCH request to write in new custom field\n    imgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`, {\n        method: 'PATCH',\n        body: document\n    })\n    .then(response => console.log(response.data.attributes))\n})\n```\n\n### Upload an image\n\n```js\nconst data = fs.readFileSync('./src/monstera.jpg');\n\nimgix.request(`sources/upload/${sourceId}/monstera.jpg`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all sources\n\n```js\nimgix.request(`sources`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Specify the fields returned\n\n```js\n// To request a deeply-nested field, use dot notation\n\nimgix.request(`sources/${sourceId}?fields[sources]=name,deployment_status,deployment.default_params`)\n.then(resp => console.log(resp));\n```\n\n### Paging by page number and size\n\n```js\nimgix.request(`assets/${sourceId}?page[number]=0&page[size]=1`)\n.then(resp => console.log(resp))\n```\n\n### Sorting lists of objects\n\n```js\n// To sort a field in descending order, prepend a dash “-” to the field name.\n\nimgix.request('sources?sort=name&fields[sources]=name')\n.then(resp => console.log(resp))\n```\n\n### Filtering lists of objects\n\n```js\nimgix.request('sources?filter[name]=staging&filter[deployment.type]=s3')\n.then(resp => console.log(resp))\n```\n\n### Create an object\n\n```js\nvar data = {\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"New Web Folder Source\",\n      \"deployment\": {\n        \"type\": \"webfolder\",\n        \"webfolder_base_url\": \"https://my-domain.com/images/\",\n        \"imgix_subdomains\": [\n          \"my-unique-imgix-subdomain\"\n        ]\n      }\n    },\n    \"type\": \"sources\"\n  },\n  \"jsonapi\": {\n    \"version\": \"1.0\"\n  }\n}\n\nimgix.request(`sources`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_large)\n","gitHead":"5c7ea2adc28a25953677d9aeea4b4c7851e60170","scripts":{"lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run dtslint","dtslint":"dtslint types","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"7.7.4","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"14.15.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.3.4","mocha":"8.3.2","sinon":"10.0.0","dtslint":"4.0.8","prettier":"2.2.1","@types/node-fetch":"2.5.10"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.2.1-beta.2_1618334311856_0.4126342433128747","host":"s3://npm-registry-packages"}},"1.2.1-beta.3":{"name":"imgix-management-js","version":"1.2.1-beta.3","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.2.1-beta.3","maintainers":[{"name":"lball","email":"lball@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"0a6ef34ba6c22ebb5b2a9ddefbcefb7fa3bffb42","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.2.1-beta.3.tgz","fileCount":14,"integrity":"sha512-DgT+jd9v7ulrADG6OdXNkdTqDsUrRdw7B7ifVdgkCHz+SzOYHOuEg4RAFDJv0k1bJoHRfLGX9nlwrOQ/1bDBZQ==","signatures":[{"sig":"MEYCIQDOz8bEUbm6J5daM96G+1cC/9s1qcX+bsFxxuZGZQhZ4QIhAJm796jqXqXISwjy6epJiDeJKUA5S67mrAYBjJ28eoJC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdlTbCRA9TVsSAnZWagAAIysP/2yjjK/OiWU+xTzd+1gn\nrKDzbmkwWmSDEyzuDCnZa4yMJolbaeXqw0ZxgwufL2pCnExykxiLfD9GSmhj\nV/T2nT2ip5DpcJcbwZ3WXe0Fx9f5/jSjrf+QQjqXBAEfj3UnxAuSsVKAW7i1\n07QvCh+zbfQbZqRJ8quXhO/eXRLOamOMcaU1qwd03lQ6WxWv/rIc3fTlK70m\n1CG+pTlatsDCpP8Kqa8KqTiqZ4R5zWSbcBErgLqQNoPuxfMmu3u6njc1MBy4\n+2SLjbgYFP9R04ph+Zw4SGrHvzr6AoHGoxaHD2mAtUC0dXoi+jUOZTWaMSG5\n7Lyfarafe7v2pVhTnbezmEXUBGsMw7LmFeDtHFMEhHYPUkDtUsTbsmK1I238\nVyFfJvY5SOxiMfc6D7J8vt4/1eZBPIDzhAhbeMHy3//sFvDTRKELgx85rsLY\nnw23NCycmtoLD/Nm0lEfP4pXvEga/cQ0N8eECXDev7B97kRcJ0vCWpvlAecM\nejbIGUB2MZG3pgE+DgA0m5Yt+UQBzxybrH6xgHo3GKkhzlfAAfK0dg2TYvwd\n15JuY+pUnJC0W7Yh0XmmrVD4UqvO0C4gOr/ILsy+OHoAmrAxZKqJPH+SLP3t\nvJM8Ki9bzMHvgzUiMXkmGvHpH93jPIm4Ldnw4bulFeMF0YdQdP2DdFssOIKi\n+eLS\r\n=fkZ4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","readme":"⚠️ **This library is currently marked as experimental. We plan to eventually integrate it as its own module in [`imgix-core-js`](https://github.com/imgix/imgix-core-js).**\n\n<!-- ix-docs-ignore -->\n\n![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)\n\n`imgix-management-js` is a JavaScript client library for making requests against the [imgix](https://www.imgix.com/) Management API.\n\n[![NPM Version](https://img.shields.io/npm/v/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Build Status](https://travis-ci.org/imgix/imgix-management-js.svg?branch=main)](https://travis-ci.org/imgix/imgix-management-js)\n[![Monthly Downloads](https://img.shields.io/npm/dm/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Minified Size](https://img.shields.io/bundlephobia/min/imgix-management-js)](https://bundlephobia.com/result?p=imgix-management-js)\n[![License](https://img.shields.io/github/license/imgix/imgix-management-js)](https://github.com/imgix/imgix-management-js/blob/main/LICENSE.md)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_shield)\n\n---\n\n<!-- /ix-docs-ignore -->\n\n- [Installation](#installation)\n    * [CommonJS](#commonjs)\n- [Configuration](#configuration)\n- [API](#api)\n    * [`ImgixAPI.request(path, options)`](#imgixapirequestpath-options)\n- [Usage Examples](#usage-examples)\n    * [Retrieve a list of images](#retrieve-a-list-of-images)\n    * [Retrieve all details for a single image](#retrieve-all-details-for-a-single-image)\n    * [Retrieve custom fields for a single image](#retrieve-custom-fields-for-a-single-image)\n    * [Update custom fields for a single image](#update-custom-fields-for-a-single-image)\n    * [Upload an image](#upload-an-image)\n    * [Retrieve all sources](#retrieve-all-sources)\n    * [Specify the fields returned](#specify-the-fields-returned)\n    * [Paging by page number and size](#paging-by-page-number-and-size)\n    * [Sorting lists of objects](#sorting-lists-of-objects)\n    * [Filtering lists of objects](#filtering-lists-of-objects)\n    * [Create an object](#create-an-object)\n- [License](#license)\n\n## Installation\n\n`npm install imgix-management-js`\n\n`imgix-management-js` exposes a class `ImgixAPI`:\n\n### CommonJS\n\n```js\nconst ImgixAPI = require(\"imgix-management-js\");\n\nconst imgix = new ImgixAPI({\n    apiKey: `${yourApiKey}`\n});\n```\n\n## Configuration\n\nThe following options can be used when creating an instance of `ImgixAPI`:\n\n- `apiKey`: String, required. The token used to authenticate API requests.\n- `version`: Integer. The version of the API that will be requested against. Defaults to `1`.\n\n## API\n\n### `ImgixAPI.request(path, options)`\n\n- `path`: String, required. A partial path representing the relative URL endpoint to request. This will typically require a `sourceId`.\n- `options`: Object. Any custom HTTP(S) settings to be applied to a request.\n    * `method`: String, required. The request [method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods), defaults to 'GET'.\n    * `headers`: Object. Additional [information](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) included with a request.\n    * `body`: Object, String, or Buffer. A resource, such as binary data or a file, included with the request.\n\nMakes a request against the specified imgix Management API endpoint.\n\n**Returns**: `Promise<[Response]>`\n\nThe supplied `path` should be a relative URL, such as `assets/{sourceId}`. Using this path, the full API URL will be constructed at the time that the request is made, saving users the need to provide the full URL themselves each time.\n\n`ImgixAPI` will intelligently populate any necessary headers prior to completing the request. This includes fields such as `Content-Type` and `Authorization`. Outside of that, the `options` argument can be used to override certain defaults, such as the HTTP request method, or provide a file for uploading.\n\n## Usage Examples\n\nThe following sections demonstrate how to use this library to make API requests for common use cases. For a full list of endpoints and operations, see the [management API docs](https://docs.imgix.com/apis/management).\n\n### Retrieve a list of images\n\n```js\nimgix.request(`assets/${sourceId}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all details for a single image\n\n```js\nimgix.request(`assets/${sourceId}/${originPath}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve custom fields for a single image\n\n```js\nvar customFields;\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    customFields = response.data.attributes.customFields;\n    console.log(customFields);\n});\n```\n\n### Update custom fields for a single image\n\n```js\nvar document = {\n    'data': {\n        'id': `${sourceId}/uploads/pecanpie.jpg`,\n        'type': 'assets',\n        'attributes': {}\n    }\n};\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    /*\n    ** Populate `document` with all pre-existing fields\n    ** so as to not overwrite them when sending a PATCH request\n    */\n    document.data.attributes.custom_fields = response.data.attributes.custom_fields;\n    document.data.attributes.custom_fields.type = 'dessert';\n\n    // PATCH request to write in new custom field\n    imgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`, {\n        method: 'PATCH',\n        body: document\n    })\n    .then(response => console.log(response.data.attributes))\n})\n```\n\n### Upload an image\n\n```js\nconst data = fs.readFileSync('./src/monstera.jpg');\n\nimgix.request(`sources/upload/${sourceId}/monstera.jpg`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all sources\n\n```js\nimgix.request(`sources`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Specify the fields returned\n\n```js\n// To request a deeply-nested field, use dot notation\n\nimgix.request(`sources/${sourceId}?fields[sources]=name,deployment_status,deployment.default_params`)\n.then(resp => console.log(resp));\n```\n\n### Paging by page number and size\n\n```js\nimgix.request(`assets/${sourceId}?page[number]=0&page[size]=1`)\n.then(resp => console.log(resp))\n```\n\n### Sorting lists of objects\n\n```js\n// To sort a field in descending order, prepend a dash “-” to the field name.\n\nimgix.request('sources?sort=name&fields[sources]=name')\n.then(resp => console.log(resp))\n```\n\n### Filtering lists of objects\n\n```js\nimgix.request('sources?filter[name]=staging&filter[deployment.type]=s3')\n.then(resp => console.log(resp))\n```\n\n### Create an object\n\n```js\nvar data = {\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"New Web Folder Source\",\n      \"deployment\": {\n        \"type\": \"webfolder\",\n        \"webfolder_base_url\": \"https://my-domain.com/images/\",\n        \"imgix_subdomains\": [\n          \"my-unique-imgix-subdomain\"\n        ]\n      }\n    },\n    \"type\": \"sources\"\n  },\n  \"jsonapi\": {\n    \"version\": \"1.0\"\n  }\n}\n\nimgix.request(`sources`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_large)\n","gitHead":"6f8bb167f70a8e6ac9c08f1e4c928bc6434c3dd9","scripts":{"lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run dtslint","dtslint":"dtslint types","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"7.7.4","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"14.15.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.3.4","mocha":"8.3.2","sinon":"10.0.0","dtslint":"4.0.8","prettier":"2.2.1","@types/node-fetch":"2.5.10"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.2.1-beta.3_1618367706710_0.12085784792039789","host":"s3://npm-registry-packages"}},"1.2.1-beta.4":{"name":"imgix-management-js","version":"1.2.1-beta.4","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.2.1-beta.4","maintainers":[{"name":"lball","email":"lball@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"60439d513c117a18e89df1f6743c024ba2383d66","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.2.1-beta.4.tgz","fileCount":14,"integrity":"sha512-aWWSIGSJqPTk8J3tdG0hXYs/eSEVEq35CIcDkBa4qMiecyjxocEB1ksE/fUonLcLs0+SrV5GLh7PN5xmQMdMqg==","signatures":[{"sig":"MEUCIQD89a1F978l/Zc/rARHGxn2DB7OiMK5uQmLlV/BIEXcNwIgF82rz51A//Q4Dj2nkoT4QU268qAF+f2FPMwAbpiqsqc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23262,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgfwCECRA9TVsSAnZWagAAxDIQAJaI8GdtiGtx0YcLnM1E\n6ymcxucC3DSD/I87BaZm0MInusOdU7eTFCnMKGL8du83eLM4m6+ABkCUsshe\nPQSX7adxKH+cCOsuoxZz9SgCynsjJ8KrcpVSLW4uf5asdy6Ic3XIii32M+0e\nh3VwRJkxnOQmF6CXzf1446j4lKBnZr6h3dff0jJj5SY+1rgss9ZGpy9mcOM+\nM9CT2wdGkfVk/7w6by4MRTx7RKUQWvQcDqZnhbWLH/6KkdU2hJPJ4BjY7LFZ\nLBC1W/aPuCFzSAQ1z+c+daH9eIH2n/Osq0R2oxAz0IAzxTirz47956XX/BJu\nXGsjCzzWPIeuQqPj5YwtXg3/xFIkfdDcENkY9phYRegdUFOZEjlCSOUE/jvi\nxGJNooy1NI63JqFmz96d5qcFa50gKrMbJPbNlOUj22JUoAdj7FoKbFGD+5uB\nCWfkv1ncWle8iRtMDR3gHqguEvSqUcIoQawDFAhBifdF3PRJVgDzHGPNtjty\nq4zjwJyHQbXfe8lwWzCzJmqaTgK7DzmGu05OyR55v36SajQfvbGPgXvpqdHU\n4O32B51yQg/2nfjl44SAggMgWNP4c8tb1PV01sHaOkZUiASJySy3fcWAJj40\nLMKXwFXBVV/ANRVl4SqP+aGm0LA9B3EBxL1ABLre7OxBaZVM5GJAtcrvUMMq\nQojb\r\n=jetu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","readme":"⚠️ **This library is currently marked as experimental. We plan to eventually integrate it as its own module in [`imgix-core-js`](https://github.com/imgix/imgix-core-js).**\n\n<!-- ix-docs-ignore -->\n\n![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)\n\n`imgix-management-js` is a JavaScript client library for making requests against the [imgix](https://www.imgix.com/) Management API.\n\n[![NPM Version](https://img.shields.io/npm/v/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Build Status](https://travis-ci.org/imgix/imgix-management-js.svg?branch=main)](https://travis-ci.org/imgix/imgix-management-js)\n[![Monthly Downloads](https://img.shields.io/npm/dm/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Minified Size](https://img.shields.io/bundlephobia/min/imgix-management-js)](https://bundlephobia.com/result?p=imgix-management-js)\n[![License](https://img.shields.io/github/license/imgix/imgix-management-js)](https://github.com/imgix/imgix-management-js/blob/main/LICENSE.md)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_shield)\n\n---\n\n<!-- /ix-docs-ignore -->\n\n- [Installation](#installation)\n    * [CommonJS](#commonjs)\n- [Configuration](#configuration)\n- [API](#api)\n    * [`ImgixAPI.request(path, options)`](#imgixapirequestpath-options)\n- [Usage Examples](#usage-examples)\n    * [Retrieve a list of images](#retrieve-a-list-of-images)\n    * [Retrieve all details for a single image](#retrieve-all-details-for-a-single-image)\n    * [Retrieve custom fields for a single image](#retrieve-custom-fields-for-a-single-image)\n    * [Update custom fields for a single image](#update-custom-fields-for-a-single-image)\n    * [Upload an image](#upload-an-image)\n    * [Retrieve all sources](#retrieve-all-sources)\n    * [Specify the fields returned](#specify-the-fields-returned)\n    * [Paging by page number and size](#paging-by-page-number-and-size)\n    * [Sorting lists of objects](#sorting-lists-of-objects)\n    * [Filtering lists of objects](#filtering-lists-of-objects)\n    * [Create an object](#create-an-object)\n- [License](#license)\n\n## Installation\n\n`npm install imgix-management-js`\n\n`imgix-management-js` exposes a class `ImgixAPI`:\n\n### CommonJS\n\n```js\nconst ImgixAPI = require(\"imgix-management-js\");\n\nconst imgix = new ImgixAPI({\n    apiKey: `${yourApiKey}`\n});\n```\n\n## Configuration\n\nThe following options can be used when creating an instance of `ImgixAPI`:\n\n- `apiKey`: String, required. The token used to authenticate API requests.\n- `version`: Integer. The version of the API that will be requested against. Defaults to `1`.\n\n## API\n\n### `ImgixAPI.request(path, options)`\n\n- `path`: String, required. A partial path representing the relative URL endpoint to request. This will typically require a `sourceId`.\n- `options`: Object. Any custom HTTP(S) settings to be applied to a request.\n    * `method`: String, required. The request [method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods), defaults to 'GET'.\n    * `headers`: Object. Additional [information](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) included with a request.\n    * `body`: Object, String, or Buffer. A resource, such as binary data or a file, included with the request.\n\nMakes a request against the specified imgix Management API endpoint.\n\n**Returns**: `Promise<[Response]>`\n\nThe supplied `path` should be a relative URL, such as `assets/{sourceId}`. Using this path, the full API URL will be constructed at the time that the request is made, saving users the need to provide the full URL themselves each time.\n\n`ImgixAPI` will intelligently populate any necessary headers prior to completing the request. This includes fields such as `Content-Type` and `Authorization`. Outside of that, the `options` argument can be used to override certain defaults, such as the HTTP request method, or provide a file for uploading.\n\n## Usage Examples\n\nThe following sections demonstrate how to use this library to make API requests for common use cases. For a full list of endpoints and operations, see the [management API docs](https://docs.imgix.com/apis/management).\n\n### Retrieve a list of images\n\n```js\nimgix.request(`assets/${sourceId}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all details for a single image\n\n```js\nimgix.request(`assets/${sourceId}/${originPath}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve custom fields for a single image\n\n```js\nvar customFields;\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    customFields = response.data.attributes.customFields;\n    console.log(customFields);\n});\n```\n\n### Update custom fields for a single image\n\n```js\nvar document = {\n    'data': {\n        'id': `${sourceId}/uploads/pecanpie.jpg`,\n        'type': 'assets',\n        'attributes': {}\n    }\n};\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    /*\n    ** Populate `document` with all pre-existing fields\n    ** so as to not overwrite them when sending a PATCH request\n    */\n    document.data.attributes.custom_fields = response.data.attributes.custom_fields;\n    document.data.attributes.custom_fields.type = 'dessert';\n\n    // PATCH request to write in new custom field\n    imgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`, {\n        method: 'PATCH',\n        body: document\n    })\n    .then(response => console.log(response.data.attributes))\n})\n```\n\n### Upload an image\n\n```js\nconst data = fs.readFileSync('./src/monstera.jpg');\n\nimgix.request(`sources/upload/${sourceId}/monstera.jpg`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all sources\n\n```js\nimgix.request(`sources`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Specify the fields returned\n\n```js\n// To request a deeply-nested field, use dot notation\n\nimgix.request(`sources/${sourceId}?fields[sources]=name,deployment_status,deployment.default_params`)\n.then(resp => console.log(resp));\n```\n\n### Paging by page number and size\n\n```js\nimgix.request(`assets/${sourceId}?page[number]=0&page[size]=1`)\n.then(resp => console.log(resp))\n```\n\n### Sorting lists of objects\n\n```js\n// To sort a field in descending order, prepend a dash “-” to the field name.\n\nimgix.request('sources?sort=name&fields[sources]=name')\n.then(resp => console.log(resp))\n```\n\n### Filtering lists of objects\n\n```js\nimgix.request('sources?filter[name]=staging&filter[deployment.type]=s3')\n.then(resp => console.log(resp))\n```\n\n### Create an object\n\n```js\nvar data = {\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"New Web Folder Source\",\n      \"deployment\": {\n        \"type\": \"webfolder\",\n        \"webfolder_base_url\": \"https://my-domain.com/images/\",\n        \"imgix_subdomains\": [\n          \"my-unique-imgix-subdomain\"\n        ]\n      }\n    },\n    \"type\": \"sources\"\n  },\n  \"jsonapi\": {\n    \"version\": \"1.0\"\n  }\n}\n\nimgix.request(`sources`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_large)\n","gitHead":"0ef75613351ef4122b56e0dd52fe454cd351e05a","scripts":{"lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run dtslint","dtslint":"dtslint types","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"7.7.4","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"14.15.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.3.4","mocha":"8.3.2","sinon":"10.0.0","dtslint":"4.0.8","prettier":"2.2.1","@types/node-fetch":"2.5.10"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.2.1-beta.4_1618935940298_0.6302202922096647","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"imgix-management-js","version":"1.2.1","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.2.1","maintainers":[{"name":"lball","email":"lball@imgix.com"},{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"0422420f87eeab7e256edd6026e3fc4b71e4fbb9","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.2.1.tgz","fileCount":14,"integrity":"sha512-OvYn9CxBHKhbxs1O4n5vAivTHGjbWIbqyn4nz51AyLP7/Es2hnjmX7Dcz1XBl9YIDS8Qov+h7OA61JCtQuK/Kg==","signatures":[{"sig":"MEUCIBj7jLGiH6592LIQDkUXDi4fHjYuGtJC+MjvSU8Enp3GAiEAvpP+E6zNI8BJ8MZGyfByQ4V1FDRkxy/c8Mm+rx4hYsI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggyoLCRA9TVsSAnZWagAAtM0QAICyS80ki4kU728upKlt\nFIS64dJ1OFiMLOL2aW7A439WRiTSwZqnCXJhDdocZHbIwdO6ZIScYvIbygtb\nfNTiqRzbFq6YwTDxIG4Wt8NZbZ+XdfdJs2ebzek4egEjygCrvcrw4EL9/hAH\nAGAne66oePjzg3V6W5B2oAwGyg+WiccZq5s1F7TbCG6W7HHO2flDnXt16ZtJ\nS70e8fSx9JtE/erNdv3+d3LQIlSEC+NrK1bAY6w31crOAjAXBswQzx0K6SEY\nUEapKOSyW8Med/Cq/BljAAR5VvDj5DHuaWgOXvzqwLNqsBuemhnZRLmflWEu\nDQNv5xwPA9E/In40Qh9Jr35V7RO1OIoyahQTMOO6PFj3Wf9Q67fu5joQOPB9\nY8ucl+ulDZIjsppDTY2zX0ofi+uiklkKrBwlawoYG5gZQSyyGIXoLGDgq9rs\nQr4MSeRxp6eVdK5cw2slHquGMAv6jd8QXhVsIXtEsxZEsgQY7zl7JsKMweQK\ngZmBqnqzWHLqnurC37/jyIC9Btmnp7VcAYZLNoQAI4dapreCsx4ILvyKcuqQ\nPZE3969r8RHIWz9uk1Fw4nHWVOn3rBvgFsBUZHy22tYkckq77ABmC+LQeID1\nCULqEgtuZ09RgcuVPI6iCXTLWXUC3wnU4YaXX7H7sfo8kwDfeuLSpGZSF4Hw\n94hh\r\n=mlfB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","gitHead":"1d7901d1929544c4dd123a535b31b5092bac6ae6","scripts":{"lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run dtslint","dtslint":"dtslint types","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"7.7.4","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"14.15.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.3.4","mocha":"8.3.2","sinon":"10.0.0","dtslint":"4.0.8","prettier":"2.2.1","@types/node-fetch":"2.5.10"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.2.1_1619208715198_0.039087372290517175","host":"s3://npm-registry-packages"}},"1.2.2":{"name":"imgix-management-js","version":"1.2.2","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.2.2","maintainers":[{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"},{"name":"lball","email":"lball@imgix.com"},{"name":"vuryanh","email":"rvu@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"01fff9ec4300c7e4dfc10043aa8bc9e0d92bdf9d","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.2.2.tgz","fileCount":14,"integrity":"sha512-sdLvAetwThc6p/fxX+7snuPsW9AXwTOAHJ4DWFtG5lxxDxYlymv97oBu0PqvAFTnRBBbWZnPrGz/aYDyUFZPTg==","signatures":[{"sig":"MEUCIDPXXviSK27tC7G2R4LSzxIK/5LGyQBoDmAWMS8mdgxUAiEAo9xu+WgMbgQuER32HvdfJXDKPat6pqHknl4BeE1z5dc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24565,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuYQVCRA9TVsSAnZWagAAA00P/21O7jE8zs7I0yMD1ecy\ndqBDzhZ2g6HBzck1SQ/otjz973a5yQ2z8EiYkRaxJitm2MjROJSXbtlKkpz8\nEynOyB8sh4njEwB8aMxNslUmt10QHJKW5wQNjQw79BCpr/CVzF088K9nSovz\nNqauiYsfMpsoLI7z+7DCW3I0lQLZyfuD3GSZcLaomQiwn/bcWYxEuSoSPwxH\nPfyofZSQO1Rdusc7B7UI7/o4EJ5bzHTGwkTXwuZGvIW8wJHbpvpZIE0+TKk9\n7uO7xcFKf1sQNQhxFVidjdXmG4GKTqv0GxaD/O9gXk1EG01ZK9Vq1KMLeq6S\nG4Wrd9Fpv8C3xM4Ir8nNES6y0cpdNicvd5RkroOttXJmygLKtp1qk8cPEn4u\nzmXNM5oQQeVM+8WYaDaxwNYwbvowXN0SBS0a2WWmjtHwzEew51uvqyn4LP9o\niAlizoRNar48JGpt6p7CoUfcpCuanwz/Z2w9Tqdg+O9iy5MOxUxky7DrkdaO\nlRoUqfmp0tYHGe3TggPDCViV9hD1tEUt63TAYa/UTKNVPXFeUIPJH+2Utfqq\neq7aVctpn3Zf1RSQpT/mQ19Ur+vJI5VGazmBx+TgiM7tMkNUc/AfTwgEZfAp\n8aADlTlcFyMcD7laUAKUaR3Co6W169gnQm9ILgfZlTfKCJGUtN8WTFYkfFGw\nXPFH\r\n=wOBC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","gitHead":"5a86a79da9896dc151d2ca18801799eefc4d3411","scripts":{"tsd":"tsd","lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run tsd","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"7.7.4","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"14.15.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"tsd":"^0.18.0","chai":"4.3.4","mocha":"9.1.3","sinon":"12.0.1","prettier":"2.5.0","@types/node-fetch":"^2.5.12"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.2.2_1639547925714_0.9077293318155013","host":"s3://npm-registry-packages"}},"1.3.0-rc.1":{"name":"imgix-management-js","version":"1.3.0-rc.1","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.3.0-rc.1","maintainers":[{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"},{"name":"lball","email":"lball@imgix.com"},{"name":"vuryanh","email":"rvu@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"08fb9366fcb12f8673e958da72852daba78780e1","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.3.0-rc.1.tgz","fileCount":14,"integrity":"sha512-GCmfXQS5mFT5Mn2VNl5HtACOtAGK0y9KfAvBh8P2bbi7wIL+o2hjr1pChH4SKVxu1mahyFcr5cfjgBB2ku0Vrw==","signatures":[{"sig":"MEQCIHOtA8UxQayxZzwLHjKBUU2cdJoi3THd9acIbdOyQ+mIAiBkMI70hJNe6J75HYJ7shlFQoyhSHW+W4hjkU8cNl0v9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25053,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiO5RsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUpBAAjy4zygHlUTR/M4AeYo2tU1PATml4dH1xBw2BlSFVmVI1gUTh\r\nJOcCxOloSIKqwwXXw+Moc0xIjjpqIzxcvWnzBsX6AyuEuaaWbJT6iPtyaBJi\r\nkpLMoyUG6g1jLYfJDl9IR+Fzi76OctoX8yB9ncwBydBmLWhwII/JYdS1kLGL\r\nOEwAXQKQYOIs0mAkbSTiWRsX6tjxN2KUvsBc9DYGG4b/+g2Qr/VdA4Kkv3Mn\r\ngwFqPbLar0u9cNyNjlbMRxcbsX4rkVUtIHCzu2apz4ISllqJR3xStocm5xrQ\r\nK0VpKPX53Xn2jd5+WqpqzqxuTYoddAhky9F6SXMYZjVppBlnjTowB3j64als\r\nuxn6L8aUeYh1RK3S8U6cFOK/hQT9YG8VTmM3dY8RHBT1qpsE0joUkEqA3Och\r\nSIms1wo4Z2dvyDIrADnb1CtSrIxzfEaJP957ak/3Ac1uPjEPJVsuR+RFIOZp\r\n5KgUm+JY8pGRWo9ObquU8ezq4mJPgTv53geGHjRYWsIge/1N6sNd/Azi4sQK\r\nlOmgm2uRpfL6Do5nDNeQgCJ2ovQipkRwaVR112aaEZygZNDLkd781lHwM6ZE\r\nIvewZ/nYfWSWfZq/Fe+xbSaoF6ZSSBWLW3zsUybLIY95MA0G8/KcT6KycBb0\r\nqh4MumaTEr7EwmYNw09XwtwJGxU31fyv+oc=\r\n=NHXy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","readme":"⚠️ **This library is currently marked as experimental. We plan to eventually integrate it as its own module in [`@imgix/js-core`](https://github.com/imgix/js-core).**\n\n<!-- ix-docs-ignore -->\n\n![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)\n\n`imgix-management-js` is a JavaScript client library for making requests against the [imgix](https://www.imgix.com/) Management API.\n\n[![NPM Version](https://img.shields.io/npm/v/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Build Status](https://travis-ci.org/imgix/imgix-management-js.svg?branch=main)](https://travis-ci.org/imgix/imgix-management-js)\n[![Monthly Downloads](https://img.shields.io/npm/dm/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Minified Size](https://img.shields.io/bundlephobia/min/imgix-management-js)](https://bundlephobia.com/result?p=imgix-management-js)\n[![License](https://img.shields.io/github/license/imgix/imgix-management-js)](https://github.com/imgix/imgix-management-js/blob/main/LICENSE.md)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_shield)\n\n---\n\n<!-- /ix-docs-ignore -->\n\n- [Installation](#installation)\n    * [CommonJS](#commonjs)\n- [Configuration](#configuration)\n- [API](#api)\n    * [`ImgixAPI.request(path, options)`](#imgixapirequestpath-options)\n- [Usage Examples](#usage-examples)\n    * [Retrieve a list of images](#retrieve-a-list-of-images)\n    * [Retrieve all details for a single image](#retrieve-all-details-for-a-single-image)\n    * [Retrieve custom fields for a single image](#retrieve-custom-fields-for-a-single-image)\n    * [Update custom fields for a single image](#update-custom-fields-for-a-single-image)\n    * [Upload an image](#upload-an-image)\n    * [Retrieve all sources](#retrieve-all-sources)\n    * [Specify the fields returned](#specify-the-fields-returned)\n    * [Paging by page number and size](#paging-by-page-number-and-size)\n    * [Sorting lists of objects](#sorting-lists-of-objects)\n    * [Filtering lists of objects](#filtering-lists-of-objects)\n    * [Create an object](#create-an-object)\n- [License](#license)\n\n## Installation\n\n`npm install imgix-management-js`\n\n`imgix-management-js` exposes a class `ImgixAPI`:\n\n### CommonJS\n\n```js\nconst ImgixAPI = require(\"imgix-management-js\");\n\nconst imgix = new ImgixAPI({\n    apiKey: `${yourApiKey}`\n});\n```\n\n## Configuration\n\nThe following options can be used when creating an instance of `ImgixAPI`:\n\n- `apiKey`: String, required. The token used to authenticate API requests.\n- `version`: Integer. The version of the API that will be requested against. Defaults to `1`.\n\n## API\n\n### `ImgixAPI.request(path, options)`\n\n- `path`: String, required. A partial path representing the relative URL endpoint to request. This will typically require a `sourceId`.\n- `options`: Object. Any custom HTTP(S) settings to be applied to a request.\n    * `method`: String, required. The request [method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods), defaults to 'GET'.\n    * `headers`: Object. Additional [information](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) included with a request.\n    * `body`: Object, String, or Buffer. A resource, such as binary data or a file, included with the request.\n\nMakes a request against the specified imgix Management API endpoint.\n\n**Returns**: `Promise<[Response]>`\n\nThe supplied `path` should be a relative URL, such as `assets/{sourceId}`. Using this path, the full API URL will be constructed at the time that the request is made, saving users the need to provide the full URL themselves each time.\n\n`ImgixAPI` will intelligently populate any necessary headers prior to completing the request. This includes fields such as `Content-Type` and `Authorization`. Outside of that, the `options` argument can be used to override certain defaults, such as the HTTP request method, or provide a file for uploading.\n\n## Usage Examples\n\nThe following sections demonstrate how to use this library to make API requests for common use cases. For a full list of endpoints and operations, see the [management API docs](https://docs.imgix.com/apis/management).\n\n### Retrieve a list of images\n\n```js\nimgix.request(`assets/${sourceId}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all details for a single image\n\n```js\nimgix.request(`assets/${sourceId}/${originPath}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve custom fields for a single image\n\n```js\nvar customFields;\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    customFields = response.data.attributes.customFields;\n    console.log(customFields);\n});\n```\n\n### Update custom fields for a single image\n\n```js\nvar document = {\n    'data': {\n        'id': `${sourceId}/pecanpie.jpg`,\n        'type': 'assets',\n        'attributes': {}\n    }\n};\n\nimgix.request(`sources/${sourceId}/assets/pecanpie.jpg`)\n.then(response => {\n    /*\n    ** Populate `document` with all pre-existing fields\n    ** so as to not overwrite them when sending a PATCH request\n    */\n    document.data.attributes.custom_fields = response.data.attributes.custom_fields;\n    document.data.attributes.custom_fields.type = 'dessert';\n\n    // PATCH request to write in new custom field\n    imgix.request(`sources/${sourceId}/assets/pecanpie.jpg`, {\n        method: 'PATCH',\n        body: document\n    })\n    .then(response => console.log(response.data.attributes))\n})\n```\n\n### Upload an image\n\n```js\nconst data = fs.readFileSync('./src/monstera.jpg');\n\nimgix.request(`sources/upload/${sourceId}/monstera.jpg`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all sources\n\n```js\nimgix.request(`sources`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Specify the fields returned\n\n```js\n// To request a deeply-nested field, use dot notation\n\nimgix.request(`sources/${sourceId}?fields[sources]=name,deployment_status,deployment.default_params`)\n.then(resp => console.log(resp));\n```\n\n### Paging by page number and size\n\n```js\nimgix.request(`assets/${sourceId}?page[number]=0&page[size]=1`)\n.then(resp => console.log(resp))\n```\n\n### Sorting lists of objects\n\n```js\n// To sort a field in descending order, prepend a dash “-” to the field name.\n\nimgix.request('sources?sort=name&fields[sources]=name')\n.then(resp => console.log(resp))\n```\n\n### Filtering lists of objects\n\n```js\nimgix.request('sources?filter[name]=staging&filter[deployment.type]=s3')\n.then(resp => console.log(resp))\n```\n\n### Create an object\n\n```js\nvar data = {\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"New Web Folder Source\",\n      \"deployment\": {\n        \"type\": \"webfolder\",\n        \"webfolder_base_url\": \"https://my-domain.com/images/\",\n        \"imgix_subdomains\": [\n          \"my-unique-imgix-subdomain\"\n        ]\n      }\n    },\n    \"type\": \"sources\"\n  },\n  \"jsonapi\": {\n    \"version\": \"1.0\"\n  }\n}\n\nimgix.request(`sources`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_large)\n","gitHead":"fbd063767dc6994c4beef050552d3791692681b6","scripts":{"tsd":"tsd","lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run tsd","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"8.1.2","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"16.13.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsd":"0.19.1","chai":"4.3.6","mocha":"9.2.1","sinon":"13.0.1","prettier":"2.5.1","@types/node-fetch":"2.6.1"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.3.0-rc.1_1648071788276_0.5773491221549172","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"imgix-management-js","version":"1.3.0","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.3.0","maintainers":[{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"},{"name":"lball","email":"lball@imgix.com"},{"name":"vuryanh","email":"rvu@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"d0d51152d73ffbda7d605d6ccbec2d3c3434b9b1","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.3.0.tgz","fileCount":14,"integrity":"sha512-YvCNjwn/wN2WHH2V7SkZFf00HgTNNfvIyljOYbaSY+zxeq7thuzGW2bFhVvmPEySDiCZt26qJFmdZHJNnKpVRQ==","signatures":[{"sig":"MEUCIQCaWGRVSnYWqykDiHvj1AxF4jdSDfCu2fCxI2aDsOhu8wIgcdguh/Uav84N0aM45Ke4cqHisGqxIpfc3Z0mFFxAaNk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25254,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPogdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmog9BAAnT9KJEsVWbLiq2ddW2VZGoP/hbJxi/tlCP67u+OB7CVdzuWT\r\n/h/goadb09yXf962WqQse4y/O5Ir9P8PzQGSfyw7t9hLD5TOiQ1ZBrcAnai3\r\n7mnl3iYqWfMe0Ez20gpIMCKgYexxU03FWvRnx0YUYUyKWKIEoRmVd7tMgSfK\r\nAVf0dHyMJGHq3nm/dd31/t6nhCGEMrWVYKpHnNzZ95BSDSnq5jLoqZI8Dhem\r\n93nQxPBE33ovACW2nQAYqR1nIz8bTKNKWRVXC6+o1Er5+bkkp3D4PH2OwtUf\r\nvqL4JP2uoV/7CTQzxv+biqtg9C5cHVHhSF8KM9/cgowtrqwmPyJqe8wVRghi\r\ngJbfbJb9A4DiiN4MskOpVVNqpZx8UDwXmhvfCG9uxtsOpd/074/gb3a7di6k\r\nHmbQfvIVnpwyM8apXamYNwDbCNd4uRVQJ1EQG3a88iE00+HOt+S70EGrSIwJ\r\nL7HxMNdyXDmGDZpypooltkI1WArCaoje8Syz8Qi+8+wpeOreAY2s5FOuQm4J\r\n11bFEncE2e/pGlqbc5rpQEaj+j8pP1BKOn6pX2bVOg6oGHqST3mpDZM3qapT\r\n9mrWrTPcpygDGoeaKv1/hB2DyiGFpLf2eiJWHnS3naGdOoFmEr/0KqNKVMuI\r\nNZ9zF2v6vrm/mHL7C9v+CrX1CvyPZLhdg7A=\r\n=6GJI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","gitHead":"4cbc33f22b4e474eab6718d745aa0cd87c7977dc","scripts":{"tsd":"tsd","lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run tsd","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"sherwinski","email":"sherwinhb@gmail.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"8.1.2","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"16.13.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"tsd":"0.19.1","chai":"4.3.6","mocha":"9.2.1","sinon":"13.0.1","prettier":"2.5.1","@types/node-fetch":"2.6.1"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.3.0_1648265245527_0.9137504199651352","host":"s3://npm-registry-packages"}},"1.3.1-rc.1":{"name":"imgix-management-js","version":"1.3.1-rc.1","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.3.1-rc.1","maintainers":[{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"},{"name":"lball","email":"lball@imgix.com"},{"name":"vuryanh","email":"rvu@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"dc12876db76ecf75aaf64095224b4cb4e000532d","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.3.1-rc.1.tgz","fileCount":15,"integrity":"sha512-eBub7NHnax/l6YU8f7KzWk8UdyepjVKDE4YWpqcUJu974iz/bW+2AHmp/gimY8JqfQXdnsWY0GerNage4BX37A==","signatures":[{"sig":"MEUCIQClnegYRPJdVWkQHC6zoA1oFbXUospi/kw4cTY2fdMmKAIgVmnGMhcxAeJUeL8QBTnUBO9oZ3a1eu+rJoJYOueEEZo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimOIUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrroQ/9Hn99ZLJRVBXRgud89itJu7hggBYQxqVlwMbnT6uz0AAKrRFQ\r\nyE6TbS35RSTi3muj65SaJ8F3xfiSAvCi1kfZDIJ32tp+V5yWgm+aWKUDGo5T\r\n4hvdglV2PYjcrCxrlZclA3jHLNvEARk0jl4I0r6ldryqStuirToy94GSUUnw\r\nYw8+d1Z+z/LFHyi1xpSihURQd6RbhRKPImcbOKqOYkOZVdZzz6wIImFqVKiL\r\n/z+YHw+JfHSf4NzyQSr9JlshfYSr9QReiXAsadg2BqZ08PlRSqyUDFn1960I\r\ncZDW0jPR0nxbd5VwlC1CI9L412h/pKq2IkpqZppsBhQHgjWJJuIOfFzKeDtb\r\nWjK+oRtMFqxKZAYr5qHSzYuHm5hGTq+9Hobm7CoNlb6Zlxv2iISIRfIQJf2u\r\nJzhoh5a4lUB/P41FFchfnqzjuyth5EkA/PTXjOfD29STelR2rGK3Gw0iJ5g4\r\nw20B1d+a5ikHL1JskrnZSFmE6yeljuOeZY/Tlv8wyOUKwYicIwMJdF4er5M4\r\n8jrafNU8krQeEK79Uhn30NS6CksbOuWSY+1lBwhIdinqW5gE6ODBqjZNHGRp\r\nC2XrqI49nd1MmY/dKgjFcFmjssQr27mUYLJHEOTVB3z1429NSnV+V5cbgZf9\r\nQjkeGc6l2d4mjea0RjEvxsJ5kBj5qexTg9g=\r\n=XJ06\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","readme":"⚠️ **This library is currently marked as experimental. We plan to eventually integrate it as its own module in [`@imgix/js-core`](https://github.com/imgix/js-core).**\n\n<!-- ix-docs-ignore -->\n\n![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)\n\n`imgix-management-js` is a JavaScript client library for making requests against the [imgix](https://www.imgix.com/) Management API.\n\n[![NPM Version](https://img.shields.io/npm/v/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Build Status](https://circleci.com/gh/imgix/imgix-management-js.svg?style=shield)](https://circleci.com/gh/imgix/imgix-management-js)\n[![Monthly Downloads](https://img.shields.io/npm/dm/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Minified Size](https://img.shields.io/bundlephobia/min/imgix-management-js)](https://bundlephobia.com/result?p=imgix-management-js)\n[![License](https://img.shields.io/github/license/imgix/imgix-management-js)](https://github.com/imgix/imgix-management-js/blob/main/LICENSE.md)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_shield)\n\n---\n\n<!-- /ix-docs-ignore -->\n\n- [Installation](#installation)\n    * [CommonJS](#commonjs)\n- [Configuration](#configuration)\n- [API](#api)\n    * [`ImgixAPI.request(path, options)`](#imgixapirequestpath-options)\n- [Usage Examples](#usage-examples)\n    * [Retrieve a list of images](#retrieve-a-list-of-images)\n    * [Retrieve all details for a single image](#retrieve-all-details-for-a-single-image)\n    * [Retrieve custom fields for a single image](#retrieve-custom-fields-for-a-single-image)\n    * [Update custom fields for a single image](#update-custom-fields-for-a-single-image)\n    * [Upload an image](#upload-an-image)\n    * [Retrieve all sources](#retrieve-all-sources)\n    * [Specify the fields returned](#specify-the-fields-returned)\n    * [Paging by page number and size](#paging-by-page-number-and-size)\n    * [Sorting lists of objects](#sorting-lists-of-objects)\n    * [Filtering lists of objects](#filtering-lists-of-objects)\n    * [Create an object](#create-an-object)\n- [License](#license)\n\n## Installation\n\n`npm install imgix-management-js`\n\n`imgix-management-js` exposes a class `ImgixAPI`:\n\n### CommonJS\n\n```js\nconst ImgixAPI = require(\"imgix-management-js\");\n\nconst imgix = new ImgixAPI({\n    apiKey: `${yourApiKey}`\n});\n```\n\n## Configuration\n\nThe following options can be used when creating an instance of `ImgixAPI`:\n\n- `apiKey`: String, required. The token used to authenticate API requests.\n- `version`: Integer. The version of the API that will be requested against. Defaults to `1`.\n\n## API\n\n### `ImgixAPI.request(path, options)`\n\n- `path`: String, required. A partial path representing the relative URL endpoint to request. This will typically require a `sourceId`.\n- `options`: Object. Any custom HTTP(S) settings to be applied to a request.\n    * `method`: String, required. The request [method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods), defaults to 'GET'.\n    * `headers`: Object. Additional [information](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) included with a request.\n    * `body`: Object, String, or Buffer. A resource, such as binary data or a file, included with the request.\n\nMakes a request against the specified imgix Management API endpoint.\n\n**Returns**: `Promise<[Response]>`\n\nThe supplied `path` should be a relative URL, such as `assets/{sourceId}`. Using this path, the full API URL will be constructed at the time that the request is made, saving users the need to provide the full URL themselves each time.\n\n`ImgixAPI` will intelligently populate any necessary headers prior to completing the request. This includes fields such as `Content-Type` and `Authorization`. Outside of that, the `options` argument can be used to override certain defaults, such as the HTTP request method, or provide a file for uploading.\n\n## Usage Examples\n\nThe following sections demonstrate how to use this library to make API requests for common use cases. For a full list of endpoints and operations, see the [management API docs](https://docs.imgix.com/apis/management).\n\n### Retrieve a list of images\n\n```js\nimgix.request(`assets/${sourceId}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all details for a single image\n\n```js\nimgix.request(`assets/${sourceId}/${originPath}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve custom fields for a single image\n\n```js\nvar customFields;\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    customFields = response.data.attributes.customFields;\n    console.log(customFields);\n});\n```\n\n### Update custom fields for a single image\n\n```js\nvar document = {\n    'data': {\n        'id': `${sourceId}/pecanpie.jpg`,\n        'type': 'assets',\n        'attributes': {}\n    }\n};\n\nimgix.request(`sources/${sourceId}/assets/pecanpie.jpg`)\n.then(response => {\n    /*\n    ** Populate `document` with all pre-existing fields\n    ** so as to not overwrite them when sending a PATCH request\n    */\n    document.data.attributes.custom_fields = response.data.attributes.custom_fields;\n    document.data.attributes.custom_fields.type = 'dessert';\n\n    // PATCH request to write in new custom field\n    imgix.request(`sources/${sourceId}/assets/pecanpie.jpg`, {\n        method: 'PATCH',\n        body: document\n    })\n    .then(response => console.log(response.data.attributes))\n})\n```\n\n### Upload an image\n\n```js\nconst data = fs.readFileSync('./src/monstera.jpg');\n\nimgix.request(`sources/upload/${sourceId}/monstera.jpg`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all sources\n\n```js\nimgix.request(`sources`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Specify the fields returned\n\n```js\n// To request a deeply-nested field, use dot notation\n\nimgix.request(`sources/${sourceId}?fields[sources]=name,deployment_status,deployment.default_params`)\n.then(resp => console.log(resp));\n```\n\n### Paging by page number and size\n\n```js\nimgix.request(`assets/${sourceId}?page[number]=0&page[size]=1`)\n.then(resp => console.log(resp))\n```\n\n### Sorting lists of objects\n\n```js\n// To sort a field in descending order, prepend a dash “-” to the field name.\n\nimgix.request('sources?sort=name&fields[sources]=name')\n.then(resp => console.log(resp))\n```\n\n### Filtering lists of objects\n\n```js\nimgix.request('sources?filter[name]=staging&filter[deployment.type]=s3')\n.then(resp => console.log(resp))\n```\n\n### Create an object\n\n```js\nvar data = {\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"New Web Folder Source\",\n      \"deployment\": {\n        \"type\": \"webfolder\",\n        \"webfolder_base_url\": \"https://my-domain.com/images/\",\n        \"imgix_subdomains\": [\n          \"my-unique-imgix-subdomain\"\n        ]\n      }\n    },\n    \"type\": \"sources\"\n  },\n  \"jsonapi\": {\n    \"version\": \"1.0\"\n  }\n}\n\nimgix.request(`sources`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_large)\n","gitHead":"a58aff004a823991b00783fcd411127c6b9d1a17","release":{"plugins":[["@semantic-release/commit-analyzer",{"releaseRules":[{"type":"docs","release":"patch"},{"type":"deps","scope":"deps","release":"patch"}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","writerOpts":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"docs","hidden":false,"section":"Documentation"},{"type":"deps","hidden":false,"section":"Dependency Updates"},{"type":"chore","hidden":true},{"type":"style","hidden":true},{"type":"refactor","hidden":true},{"type":"perf","hidden":true},{"type":"test","hidden":true}]}}],"@semantic-release/changelog","@semantic-release/npm",["@semantic-release/git",{"assets":["src/**","package.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version}\n\n${nextRelease.notes} [skip ci]"}],"@semantic-release/github"],"branches":["main",{"name":"next","prerelease":"rc"},{"name":"beta","prerelease":true},{"name":"alpha","prerelease":true}]},"scripts":{"tsd":"tsd","lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run tsd","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"imgix-company","email":"developers@imgix.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"17.9.0","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tsd":"0.20.0","chai":"4.3.6","mocha":"9.2.2","sinon":"13.0.2","prettier":"2.6.2","@types/node-fetch":"2.6.1","@semantic-release/git":"^10.0.1","@semantic-release/changelog":"^6.0.1","conventional-changelog-conventionalcommits":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.3.1-rc.1_1654186516032_0.5531885996319124","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"imgix-management-js","version":"1.3.1","keywords":["imgix","api","javascript","management"],"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","_id":"imgix-management-js@1.3.1","maintainers":[{"name":"fredfogerty","email":"frederick.fogerty@gmail.com"},{"name":"imgix-company","email":"developers@imgix.com"},{"name":"czacharias","email":"chris@imgix.com"},{"name":"sherwinski","email":"sherwinhb@gmail.com"},{"name":"cnoble","email":"cnoble@imgix.com"},{"name":"matt-imgix","email":"mlaguardia@imgix.com"},{"name":"albertmejia","email":"albert@imgix.com"},{"name":"heyitsbryanm","email":"matiasbryan@gmail.com"},{"name":"ultimatealf","email":"aacosta@imgix.com"},{"name":"edsz","email":"esanchez@imgix.com"},{"name":"lball","email":"lball@imgix.com"},{"name":"vuryanh","email":"rvu@imgix.com"}],"homepage":"https://github.com/imgix/imgix-management-js#readme","bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"dist":{"shasum":"b5748d62f5f896ddfb3914ffd7e33bddf91f6953","tarball":"https://registry.npmjs.org/imgix-management-js/-/imgix-management-js-1.3.1.tgz","fileCount":15,"integrity":"sha512-uZ2GquurX2OV3IFm5mkIXhsyJTHImlszAtHG4cS9gOf4Zx++symY/ua5czOeTbwsB6iWKVEuygDG0nIhN5Gt+g==","signatures":[{"sig":"MEUCIQDcp9xPLLHAXz0G6V/MiSPXpJVs6+7rC/SXo36R7d9eWQIgAeT2DEJH/lHU8Urb6Q0BNYjjdeXDIrAAEDEDUU0B1Zc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29120,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiontIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6xw//QDao/LhYuOh2V9FdD0xe62biMMX8qyWV7Jz2EYgt+oO1aNWI\r\nI21tA1IfJVbzncE8qWW3nUHGtMHmwEYc7/o1rKXvKVm68+lGPUJtli/5Ogk0\r\n03IFgVxWV2vxw/Z1/VKTDgmDZmMjiUKXxbPmdbY8JI53WZv0YJ7NIujtC0NW\r\nSw7MtEI3e0acat/AT1SK+/YxtyR6DGR8CqX16SwCAMHQp4u5jAQ1swcLdL4l\r\nAM0wQnkpV69K9ZV+CLmtkrfl+z2D3WO/OGryz9RVzUBxXf/zmIUYZRoqawab\r\nOC0/pKWjSstFhH27PMBA5MS92+DULC03g+1OnQZeRosyLHNWhMcJ6D0gLWXj\r\nGghycMFo6BEh/PEfRNaCN/oCGwPcmE9r5EmSLQ/GgQOnyzMBzkJLq4K98fk7\r\nruvc+NigzJJp1aBCNfXyR0vPMk3ZVmhpFehyY2JBlGvNzZwuYNWu86e/eMxX\r\njGUbtChKYViYalYroPRNMwjLup9AJHdCQjRk++tZvgLLXhSTHOugoAy67Don\r\nREV0Br6htXjxMlDypREH7BDw9RknwekgYVf5x7wMl4lfNRj3Ytbh5jWBqxxI\r\nbcsTFqunQIaEY+1IgK+ncx6uYncoCMOifgCoj+OIhid+1QFu/gTZiFWTe54D\r\nfjlBNn+y+x5rfBLPrJroQSz4NKDFAyc+g1o=\r\n=iExH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/imgix-api.js","types":"./types/index.d.ts","gitHead":"4eeddfb1750a4043a1c2ce49f254ffaed2d263e7","release":{"plugins":[["@semantic-release/commit-analyzer",{"releaseRules":[{"type":"docs","release":"patch"},{"type":"deps","scope":"deps","release":"patch"}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","writerOpts":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"docs","hidden":false,"section":"Documentation"},{"type":"deps","hidden":false,"section":"Dependency Updates"},{"type":"chore","hidden":true},{"type":"style","hidden":true},{"type":"refactor","hidden":true},{"type":"perf","hidden":true},{"type":"test","hidden":true}]}}],"@semantic-release/changelog","@semantic-release/npm",["@semantic-release/git",{"assets":["src/**","package.json","CHANGELOG.md"],"message":"chore(release): ${nextRelease.version}\n\n${nextRelease.notes} [skip ci]"}],"@semantic-release/github"],"branches":["main",{"name":"next","prerelease":"rc"},{"name":"beta","prerelease":true},{"name":"alpha","prerelease":true}]},"scripts":{"tsd":"tsd","lint":"prettier --write '{src,test,types}/**/*.{js,ts}'","test":"npm run test:mocha && npm run tsd","test:mocha":"mocha","test:watch":"mocha --watch"},"_npmUser":{"name":"imgix-company","email":"developers@imgix.com"},"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"_npmVersion":"8.11.0","description":"A Javascript library that wraps the imgix management API","directories":{},"_nodeVersion":"17.9.1","dependencies":{"node-fetch":"^2.6.0"},"_hasShrinkwrap":false,"devDependencies":{"tsd":"0.20.0","chai":"4.3.6","mocha":"9.2.2","sinon":"13.0.2","prettier":"2.6.2","@types/node-fetch":"2.6.1","@semantic-release/git":"^10.0.1","@semantic-release/changelog":"^6.0.1","conventional-changelog-conventionalcommits":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/imgix-management-js_1.3.1_1654815560242_0.6311156258512336","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-06-01T18:20:56.966Z","modified":"2026-04-07T19:02:51.612Z","0.1.0":"2020-06-01T18:20:57.086Z","0.1.1":"2020-06-01T22:08:53.786Z","0.1.2":"2020-06-02T19:49:18.173Z","0.2.0":"2020-08-05T20:16:21.416Z","1.0.0":"2020-08-05T22:19:13.518Z","1.1.0-alpha.1":"2020-09-23T18:32:58.915Z","1.1.0-alpha.2":"2020-09-24T16:26:19.082Z","1.1.0":"2020-09-24T21:13:43.760Z","1.2.0":"2021-03-26T23:08:52.814Z","1.2.1-rc.1":"2021-04-07T23:21:29.820Z","1.2.1-beta.1":"2021-04-09T19:25:35.220Z","1.2.1-beta.2":"2021-04-13T17:18:32.255Z","1.2.1-beta.3":"2021-04-14T02:35:06.981Z","1.2.1-beta.4":"2021-04-20T16:25:40.414Z","1.2.1":"2021-04-23T20:11:55.329Z","1.2.2":"2021-12-15T05:58:45.878Z","1.3.0-rc.1":"2022-03-23T21:43:08.402Z","1.3.0":"2022-03-26T03:27:25.641Z","1.3.1-rc.1":"2022-06-02T16:15:16.243Z","1.3.1":"2022-06-09T22:59:20.424Z"},"bugs":{"url":"https://github.com/imgix/imgix-management-js/issues"},"author":{"url":"https://github.com/sherwinski","name":"Sherwin Heydarbeygi"},"license":"BSD-2-Clause","homepage":"https://github.com/imgix/imgix-management-js#readme","keywords":["imgix","api","javascript","management"],"repository":{"url":"git+https://github.com/imgix/imgix-management-js.git","type":"git"},"description":"A Javascript library that wraps the imgix management API","maintainers":[{"email":"developers@imgix.com","name":"imgix-company"},{"email":"chris@imgix.com","name":"czacharias"},{"email":"matiasbryan@gmail.com","name":"heyitsbryanm"},{"email":"aacosta@imgix.com","name":"ultimatealf"},{"email":"rvu@imgix.com","name":"vuryanh"},{"email":"glenn.smits@imgix.com","name":"gsmits"},{"email":"arnofkd93@gmail.com","name":"arno_fukuda"},{"email":"sherwinhb@gmail.com","name":"sherwinski"}],"readme":"⚠️ **This library is currently marked as experimental. We plan to eventually integrate it as its own module in [`@imgix/js-core`](https://github.com/imgix/js-core).**\n\n<!-- ix-docs-ignore -->\n\n![imgix logo](https://assets.imgix.net/sdk-imgix-logo.svg)\n\n`imgix-management-js` is a JavaScript client library for making requests against the [imgix](https://www.imgix.com/) Management API.\n\n[![NPM Version](https://img.shields.io/npm/v/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Build Status](https://circleci.com/gh/imgix/imgix-management-js.svg?style=shield)](https://circleci.com/gh/imgix/imgix-management-js)\n[![Monthly Downloads](https://img.shields.io/npm/dm/imgix-management-js.svg)](https://www.npmjs.com/package/imgix-management-js)\n[![Minified Size](https://img.shields.io/bundlephobia/min/imgix-management-js)](https://bundlephobia.com/result?p=imgix-management-js)\n[![License](https://img.shields.io/github/license/imgix/imgix-management-js)](https://github.com/imgix/imgix-management-js/blob/main/LICENSE.md)\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_shield)\n\n---\n\n<!-- /ix-docs-ignore -->\n\n- [Installation](#installation)\n    * [CommonJS](#commonjs)\n- [Configuration](#configuration)\n- [API](#api)\n    * [`ImgixAPI.request(path, options)`](#imgixapirequestpath-options)\n- [Usage Examples](#usage-examples)\n    * [Retrieve a list of images](#retrieve-a-list-of-images)\n    * [Retrieve all details for a single image](#retrieve-all-details-for-a-single-image)\n    * [Retrieve custom fields for a single image](#retrieve-custom-fields-for-a-single-image)\n    * [Update custom fields for a single image](#update-custom-fields-for-a-single-image)\n    * [Upload an image](#upload-an-image)\n    * [Retrieve all sources](#retrieve-all-sources)\n    * [Specify the fields returned](#specify-the-fields-returned)\n    * [Paging by page number and size](#paging-by-page-number-and-size)\n    * [Sorting lists of objects](#sorting-lists-of-objects)\n    * [Filtering lists of objects](#filtering-lists-of-objects)\n    * [Create an object](#create-an-object)\n- [License](#license)\n\n## Installation\n\n`npm install imgix-management-js`\n\n`imgix-management-js` exposes a class `ImgixAPI`:\n\n### CommonJS\n\n```js\nconst ImgixAPI = require(\"imgix-management-js\");\n\nconst imgix = new ImgixAPI({\n    apiKey: `${yourApiKey}`\n});\n```\n\n## Configuration\n\nThe following options can be used when creating an instance of `ImgixAPI`:\n\n- `apiKey`: String, required. The token used to authenticate API requests.\n- `version`: Integer. The version of the API that will be requested against. Defaults to `1`.\n\n## API\n\n### `ImgixAPI.request(path, options)`\n\n- `path`: String, required. A partial path representing the relative URL endpoint to request. This will typically require a `sourceId`.\n- `options`: Object. Any custom HTTP(S) settings to be applied to a request.\n    * `method`: String, required. The request [method](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods), defaults to 'GET'.\n    * `headers`: Object. Additional [information](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) included with a request.\n    * `body`: Object, String, or Buffer. A resource, such as binary data or a file, included with the request.\n\nMakes a request against the specified imgix Management API endpoint.\n\n**Returns**: `Promise<[Response]>`\n\nThe supplied `path` should be a relative URL, such as `assets/{sourceId}`. Using this path, the full API URL will be constructed at the time that the request is made, saving users the need to provide the full URL themselves each time.\n\n`ImgixAPI` will intelligently populate any necessary headers prior to completing the request. This includes fields such as `Content-Type` and `Authorization`. Outside of that, the `options` argument can be used to override certain defaults, such as the HTTP request method, or provide a file for uploading.\n\n## Usage Examples\n\nThe following sections demonstrate how to use this library to make API requests for common use cases. For a full list of endpoints and operations, see the [management API docs](https://docs.imgix.com/apis/management).\n\n### Retrieve a list of images\n\n```js\nimgix.request(`assets/${sourceId}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all details for a single image\n\n```js\nimgix.request(`assets/${sourceId}/${originPath}`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve custom fields for a single image\n\n```js\nvar customFields;\n\nimgix.request(`assets/${sourceId}/uploads/pecanpie.jpg`)\n.then(response => {\n    customFields = response.data.attributes.customFields;\n    console.log(customFields);\n});\n```\n\n### Update custom fields for a single image\n\n```js\nvar document = {\n    'data': {\n        'id': `${sourceId}/pecanpie.jpg`,\n        'type': 'assets',\n        'attributes': {}\n    }\n};\n\nimgix.request(`sources/${sourceId}/assets/pecanpie.jpg`)\n.then(response => {\n    /*\n    ** Populate `document` with all pre-existing fields\n    ** so as to not overwrite them when sending a PATCH request\n    */\n    document.data.attributes.custom_fields = response.data.attributes.custom_fields;\n    document.data.attributes.custom_fields.type = 'dessert';\n\n    // PATCH request to write in new custom field\n    imgix.request(`sources/${sourceId}/assets/pecanpie.jpg`, {\n        method: 'PATCH',\n        body: document\n    })\n    .then(response => console.log(response.data.attributes))\n})\n```\n\n### Upload an image\n\n```js\nconst data = fs.readFileSync('./src/monstera.jpg');\n\nimgix.request(`sources/upload/${sourceId}/monstera.jpg`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Retrieve all sources\n\n```js\nimgix.request(`sources`)\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n### Specify the fields returned\n\n```js\n// To request a deeply-nested field, use dot notation\n\nimgix.request(`sources/${sourceId}?fields[sources]=name,deployment_status,deployment.default_params`)\n.then(resp => console.log(resp));\n```\n\n### Paging by page number and size\n\n```js\nimgix.request(`assets/${sourceId}?page[number]=0&page[size]=1`)\n.then(resp => console.log(resp))\n```\n\n### Sorting lists of objects\n\n```js\n// To sort a field in descending order, prepend a dash “-” to the field name.\n\nimgix.request('sources?sort=name&fields[sources]=name')\n.then(resp => console.log(resp))\n```\n\n### Filtering lists of objects\n\n```js\nimgix.request('sources?filter[name]=staging&filter[deployment.type]=s3')\n.then(resp => console.log(resp))\n```\n\n### Create an object\n\n```js\nvar data = {\n  \"data\": {\n    \"attributes\": {\n      \"name\": \"New Web Folder Source\",\n      \"deployment\": {\n        \"type\": \"webfolder\",\n        \"webfolder_base_url\": \"https://my-domain.com/images/\",\n        \"imgix_subdomains\": [\n          \"my-unique-imgix-subdomain\"\n        ]\n      }\n    },\n    \"type\": \"sources\"\n  },\n  \"jsonapi\": {\n    \"version\": \"1.0\"\n  }\n}\n\nimgix.request(`sources`, {\n    method: 'POST',\n    body: data\n})\n.then(response => console.log(JSON.stringify(response, null, 2)));\n```\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fimgix%2Fimgix-management-js?ref=badge_large)\n","readmeFilename":"README.md"}