{"_id":"@albertogferrario/stockx-api","_rev":"32-c2f1e8d31d50a29b9caeb4846c70621e","name":"@albertogferrario/stockx-api","dist-tags":{"latest":"1.5.0"},"versions":{"1.0.1":{"name":"@albertogferrario/stockx-api","version":"1.0.1","author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.0.1","homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"94ae68118314f9521347190bd7f60a9fda99c0d9","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.0.1.tgz","fileCount":15,"integrity":"sha512-N67GoEqN77HQSLDxXSKzH+r0W//Ht/YhSRzicoupVmGRt5bFHNYCgBqrIWqJUVeSeRDW44bOqGCGoJ1+OB1B7A==","signatures":[{"sig":"MEUCIQCzuQlbrgDeNXy7idCoSa1IWl3WYJpjmAyBKsZSpTQ8WwIgaFvP8dY8IjmwdpGBj1quyE83l1fFIA3OskE13nkZ9Uc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6531},"main":"index.js","gitHead":"53b97acc6f12669fe18a6ee208d2d12e31cd03e4","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.5.0","description":"StockX Public API node package","directories":{},"_nodeVersion":"21.7.3","dependencies":{"axios":"^1.7.2","bottleneck":"^2.19.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.0.1_1719119206692_0.07063615700644887","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@albertogferrario/stockx-api","version":"1.0.2","author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.0.2","homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"24848d760aba7db2a835d1b57e480bbdfe4b4b42","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.0.2.tgz","fileCount":14,"integrity":"sha512-HNRqD0AF3wpAfadgK/ZF5QI1s2w/PGcwcCTiRS6NGs2ODAsDXkNV8ugTD5YFX4NhCSvX5Ru7jdTmwiEBUnRgTA==","signatures":[{"sig":"MEUCIQCF6NzEIC2iyiX38yN8nDH74IUjk/kxOHEcGemGYeBeDgIgavu4Ru6vmQCLJ6PF0hCJ2jWKbnwPTY9ZcbbU6CI1Lf4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6568},"main":"index.js","gitHead":"51ebf57aff54c5a8ef653d689f3ef17b9be9a892","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.7.0","description":"StockX Public API node package","directories":{},"_nodeVersion":"18.20.3","dependencies":{"axios":"^1.7.2","bottleneck":"^2.19.5"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.0.2_1719119936150_0.2644069505407207","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@albertogferrario/stockx-api","version":"1.0.3","author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.0.3","homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"2c5f6895a67f636e9d426092a1a3ea1388e08fe6","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.0.3.tgz","fileCount":15,"integrity":"sha512-prBFQvwM5DPmi0YF404ASqbxVaCRRzhiEU4qYoOuBBOMKZp2iFa2GFudzLmgzv8nmS/m9G2v66oarWdzP1+PCQ==","signatures":[{"sig":"MEYCIQDUQ8GvgepprZHgnkMjJESZI7GhZpQWOxLO3+sQNtPw2gIhAJOHQQYjbLhi1IwB5bn7eVemARk0lXRn6OVkA6hDj3Yi","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7945},"main":"index.js","gitHead":"eb66c1a976006b3d9579b998f72f0adf34a6216c","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.7.0","description":"StockX Public API node package","directories":{},"_nodeVersion":"18.20.3","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.0.3_1719724737787_0.7935111670192287","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@albertogferrario/stockx-api","version":"1.0.4","author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.0.4","homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"1454477f6ce6c43a8778b22925d20cb0131c138b","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.0.4.tgz","fileCount":15,"integrity":"sha512-2ESxvNteXeew9QR9ZkoG7j+KFkJd3MN+XtmEOqz8G2PXv3Ehc7MwsVGrV99sPehAhqqnqfGf0FZTiLbU0sDf3A==","signatures":[{"sig":"MEUCIQDXZmYmsosyStXOAOqkf+ttiOyTYhyf/lRrbz9VhzTWkQIgQ8ixK0ef548yIjRqPFai9KKiqxswrXjzGbR/4zlL+ss=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8052},"main":"index.js","gitHead":"69328ab50b322ab34f92751d041ab28101f32f96","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.7.0","description":"StockX Public API node package","directories":{},"_nodeVersion":"18.20.3","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.0.4_1719731444002_0.4693815722429202","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@albertogferrario/stockx-api","version":"1.0.5","author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.0.5","homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"0e9e6e91c2bc8b7fcad4ab2650de4d6a3be9383f","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.0.5.tgz","fileCount":15,"integrity":"sha512-ryNsluW9Mn0ZLp9jl2L3jtHmDbfpOHzKru+glmNuYohip4q2ajveASiEdlGSl/I+sMUEMtadLuoMmoQCorKOkA==","signatures":[{"sig":"MEYCIQCW1rSLF7F5XVKynPyUS78IPMaFkaaYAUC6za8DuceMDgIhAMZjuRAX+cGRLozQLh2JnXw9c/DMbdRKQlrW4lZok0wH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8382},"main":"index.js","gitHead":"4a7ed6b4afd1b17c9bdf9f148eda56faa8ff5e93","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.7.0","description":"StockX Public API node package","directories":{},"_nodeVersion":"18.20.3","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.0.5_1719841132359_0.8985354172642457","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@albertogferrario/stockx-api","version":"1.0.6","author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.0.6","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"2e1ea0120e3048c2ba3b2e559799d7f9c5eddcf5","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.0.6.tgz","fileCount":15,"integrity":"sha512-xRAeyjteokDWOzgogk7BZDiaEHk3HXsHqR9g3ZUhXaqqe8E1U3s9fTkjJrBypshIs8tTkvbukMAVxVsjT7+a8g==","signatures":[{"sig":"MEYCIQDb7N1nCQVRmzMT3WHQyF2iqk91dxnNYaAdiwWVpK6YTQIhAMbHNTqslj5lkt023zlWQzc0FH7Th2wh3pNQpnapJ+f5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8987},"main":"index.js","gitHead":"9a0fc1b058d6a6fef9c36afef6e617bec6d04314","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.7.0","description":"StockX Public API node package","directories":{},"_nodeVersion":"18.20.3","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.0.6_1720257844477_0.8718238043018949","host":"s3://npm-registry-packages"}},"1.0.7":{"name":"@albertogferrario/stockx-api","version":"1.0.7","author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.0.7","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"aef51fb3206f332685bd1c7e2002bfe45adf74a5","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.0.7.tgz","fileCount":15,"integrity":"sha512-mdvRycYKrMcuJC4scxRf/9LnRJYWotepZcAmX/ArYar9wRoHRAaSgICgjEWWmcA6Xiw80u0N9XTwnikuP+ohlg==","signatures":[{"sig":"MEUCIDd6F3PTMgixp6O3xlBtcm7QezYMGW+jDhB34rKNdUv2AiEAhJiCuxmxrtVUzHr1YdavJDIdfDpUvZrppeacILsIswE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9070},"main":"index.js","gitHead":"90a180b0770e26526dac305e9464980b60f79423","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.7.0","description":"StockX Public API node package","directories":{},"_nodeVersion":"18.20.3","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.0.7_1720260153774_0.32296739733132473","host":"s3://npm-registry-packages"}},"1.0.8":{"name":"@albertogferrario/stockx-api","version":"1.0.8","author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.0.8","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"cc03221894ee162bef91eeb2096e50d6aae1b749","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.0.8.tgz","fileCount":15,"integrity":"sha512-EWNYRq4VeLwJ7cZPpX1iTu38Ytu5mVmacV7zuuZwKJv4NeY3wRJflm+8/pJBY1z/+E/7JJ3Lkv01ZXq0m0aotg==","signatures":[{"sig":"MEUCIGhu2JsNtQzoN9WGq997WddPz+IWgDouSpdRBkIX6wL9AiEAsPA066XF9y8PFHRtrwtlFuA8CK9ke5vh3JBlQoILSN4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8988},"main":"index.js","gitHead":"ed7d1312d925e6f4a9369aee70dbbe59d22e4ee4","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.7.0","description":"StockX Public API node package","directories":{},"_nodeVersion":"18.20.3","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.0.8_1720261795684_0.9518804426944363","host":"s3://npm-registry-packages"}},"1.0.9":{"name":"@albertogferrario/stockx-api","version":"1.0.9","author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.0.9","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"0072d8a4bc494983826602efd35e392547a1a5b4","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.0.9.tgz","fileCount":15,"integrity":"sha512-zvL7cjm4sa3a6KYZj2SQtkMtYEeX/jEqW6y+iSm+ziPpDBBqEC0eYdctIr5/hljO7VqKtczSIcybpBhhbAqotQ==","signatures":[{"sig":"MEUCIDY5x70jvMkzW9O+pRUgMk0pE7P454DQwUsc30VqUzBDAiEAjW8YoVVy0e1RSTSd93tr46ROY3OZmFh7VHFrTLME6dM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9073},"main":"index.js","gitHead":"8efadba11a6ef34af7a43770c9a94b201114deac","scripts":{"lint":"eslint \"**/*.{js,ts,tsx}\"","test":"jest"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.7.0","description":"StockX Public API node package","directories":{},"_nodeVersion":"18.20.3","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.0.9_1720806830558_0.9248763858231019","host":"s3://npm-registry-packages"}},"1.2.3":{"name":"@albertogferrario/stockx-api","version":"1.2.3","keywords":["stockx","api","stockx-api","sneakers","marketplace","oauth2","authentication","rate-limiting"],"author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.2.3","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"8b84e29b47c0b3a279551fd192e0f21b6add7ccc","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.2.3.tgz","fileCount":21,"integrity":"sha512-ifSI/qsc4hwYqvlalBM9VrDaZcd6UxDjp3q7J+l4eUCdYPkOAixScDidTE2MXvC1OvOl5gvUyMy1wJj/h9H8pw==","signatures":[{"sig":"MEUCIQCWEOu39z7IT6LjCLtHKHR5jEgZoAxQoOX77UkGwbhngAIgY489zeNTWHhgdG9IE2Pke8DWIVqAgFqntQZ+/AdITxY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30755},"main":"index.js","types":"index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"ff8b6967400234e3e58e7202aae8736c7e85ed6a","scripts":{"lint":"eslint \"src/**/*.js\"","test":"jest","format":"prettier --write \"src/**/*.js\"","lint:fix":"eslint \"src/**/*.js\" --fix","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.js\"","test:coverage":"jest --coverage","prepublishOnly":"npm test"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.8.2","description":"StockX Public API node package with OAuth2 helpers and rate limiting","directories":{},"_nodeVersion":"20.19.5","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.2.3_1757450141050_0.8424896080274213","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@albertogferrario/stockx-api","version":"1.3.0","keywords":["stockx","api","stockx-api","sneakers","marketplace","oauth2","authentication","rate-limiting"],"author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.3.0","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"c82bcc38f5a97ddc75a1ff2b419d6ff8c8ec711a","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.3.0.tgz","fileCount":21,"integrity":"sha512-9UCpkkAr5cPQgAxIWCaNmnGumntxl99BYYASiLUJP/MoArcZNuLz+GE6HpciTcT5MH6mnZUdeZ6k9ncEp6DCrA==","signatures":[{"sig":"MEUCIFts/Z3kttnwBMEpxewEiF5xkxPDRbcxEC7Gixw3U1u9AiEA/7eAXUu8lbgg+d9g9eOvXRNlu0uX3IkUMs/rSK/HtrY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31880},"main":"index.js","types":"index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"f58954cc6e362d47dce52c5d340fae911b213cfe","scripts":{"lint":"eslint \"src/**/*.js\"","test":"jest","format":"prettier --write \"src/**/*.js\"","lint:fix":"eslint \"src/**/*.js\" --fix","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.js\"","test:coverage":"jest --coverage","prepublishOnly":"npm test"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.8.2","description":"StockX Public API node package with OAuth2 helpers and rate limiting","directories":{},"_nodeVersion":"20.19.5","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.3.0_1757456986474_0.3133800679533001","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@albertogferrario/stockx-api","version":"1.3.1","keywords":["stockx","api","stockx-api","sneakers","marketplace","oauth2","authentication","rate-limiting"],"author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.3.1","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"e6e5034c074ad0ae34f7bf3507b411069196f57e","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.3.1.tgz","fileCount":21,"integrity":"sha512-CNvxJJuOrzwNGUWPvTbRNeqtSyL+a5or6hY0g3TCqfrmR6JY5nVHZh5Y16evIfyNQh9Q4jTcECGlWvmo8wAhsw==","signatures":[{"sig":"MEYCIQCcjV4rbLxudKM2R1P634NgB5ZIgPYMvTIAgAuLzraX4QIhAKp9Gk6N7vNb6tZOmeom4gSnJ4lL9e4pSXfdQ2WWncEP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32641},"main":"index.js","types":"index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"e348d6f17fa5b59aa28b4aae3ecd3cd10e8d996f","scripts":{"lint":"eslint \"src/**/*.js\"","test":"jest","format":"prettier --write \"src/**/*.js\"","lint:fix":"eslint \"src/**/*.js\" --fix","test:watch":"jest --watch","format:check":"prettier --check \"src/**/*.js\"","test:coverage":"jest --coverage","prepublishOnly":"npm test"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.8.2","description":"StockX Public API node package with OAuth2 helpers and rate limiting","directories":{},"_nodeVersion":"20.19.5","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.3.1_1757469352377_0.6163598440012006","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@albertogferrario/stockx-api","version":"1.3.2","keywords":["stockx","api","stockx-api","sneakers","marketplace","oauth2","authentication","rate-limiting"],"author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.3.2","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"6d9a7bab496ceaa1f6a5a723becf9d1dd45a05de","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.3.2.tgz","fileCount":21,"integrity":"sha512-gzHjdUNxzpUxijCnPpqrSHjLy1TnJcmsG2GMsvnbzTP98Y5QxoAveUNBFZypJABDxQ7/QCfkMti9ED5inaZ8Sw==","signatures":[{"sig":"MEYCIQDdD2e4iH9z9nSZhAfQ8jeSv3CSbXsCKRWz9Te0i1hixQIhAIPlkk+vkIg8sfXCDyNaCmT35O/kqMSfTgwAHyCgTayB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35260},"main":"index.js","types":"index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"8a21db3fb37124f4127ebf2a6a96de5007518553","scripts":{"lint":"eslint \"src/**/*.js\"","test":"jest --testPathIgnorePatterns=integration","format":"prettier --write \"src/**/*.js\"","lint:fix":"eslint \"src/**/*.js\" --fix","test:all":"jest","test:watch":"jest --watch --testPathIgnorePatterns=integration","format:check":"prettier --check \"src/**/*.js\"","test:coverage":"jest --coverage --testPathIgnorePatterns=integration","prepublishOnly":"npm test","test:integration":"jest tests/integration"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.8.2","description":"StockX Public API node package with OAuth2 helpers and rate limiting","directories":{},"_nodeVersion":"20.19.5","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","dotenv":"^16.6.1","jest-mock-axios":"^4.7.3"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.3.2_1757479927276_0.1865938970990828","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@albertogferrario/stockx-api","version":"1.4.0","keywords":["stockx","api","stockx-api","sneakers","marketplace","oauth2","authentication","rate-limiting"],"author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","_id":"@albertogferrario/stockx-api@1.4.0","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"dist":{"shasum":"e92a9e8b16a16daea82544b6e70cdf320bb9e9de","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.4.0.tgz","fileCount":21,"integrity":"sha512-LtatHkuYZ5wlyxPoch32KiHt2MCE7tXvOizXPcEMp63m1IHlztjm+OyIXHxn05cfdMsJQeo0SbM6foEY42t5Kg==","signatures":[{"sig":"MEYCIQC3aqPsoHJ83vxLYYOkJSYhwcf6mTeTcm78hguG9wq0xQIhAM9wmgX2m9oRKpMITg6T9cP1yihQzx9MyFm1XKDwiMmp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38437},"main":"index.js","types":"index.d.ts","engines":{"node":">=16.0.0"},"gitHead":"c7611abf2d338aeb38d6e89968a5219af4a7ec63","scripts":{"lint":"eslint \"src/**/*.js\"","test":"jest --testPathIgnorePatterns=integration","format":"prettier --write \"src/**/*.js\"","oauth2":"node scripts/manual-oauth2.js","lint:fix":"eslint \"src/**/*.js\" --fix","test-api":"node scripts/test-api.js","test:all":"jest","test:watch":"jest --watch --testPathIgnorePatterns=integration","format:check":"prettier --check \"src/**/*.js\"","refresh-token":"node scripts/refresh-token.js","test:coverage":"jest --coverage --testPathIgnorePatterns=integration","prepublishOnly":"npm test","test:integration":"jest tests/integration"},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"repository":{"url":"git+https://github.com/albertogferrario/javascript-stockx-api.git","type":"git"},"_npmVersion":"10.8.2","description":"StockX Public API node package with OAuth2 helpers and rate limiting","directories":{},"_nodeVersion":"20.19.5","dependencies":{"cron":"^3.1.7","axios":"^1.7.2","bottleneck":"^2.19.5","cron-parser":"^4.9.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","open":"^10.2.0","dotenv":"^16.6.1","eslint":"^8.57.1","express":"^5.1.0","jest-mock-axios":"^4.7.3","eslint-plugin-jest":"^29.0.1","eslint-plugin-import":"^2.32.0","eslint-config-airbnb-base":"^15.0.0"},"_npmOperationalInternal":{"tmp":"tmp/stockx-api_1.4.0_1761492367484_0.7140602968653023","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@albertogferrario/stockx-api","version":"1.5.0","description":"StockX Public API node package with OAuth2 helpers and rate limiting","main":"index.js","types":"index.d.ts","keywords":["stockx","api","stockx-api","sneakers","marketplace","oauth2","authentication","rate-limiting"],"engines":{"node":">=16.0.0"},"scripts":{"test":"jest --testPathIgnorePatterns=integration","test:integration":"jest tests/integration","test:all":"jest","test:watch":"jest --watch --testPathIgnorePatterns=integration","test:coverage":"jest --coverage --testPathIgnorePatterns=integration","lint":"eslint \"src/**/*.js\"","lint:fix":"eslint \"src/**/*.js\" --fix","format":"prettier --write \"src/**/*.js\"","format:check":"prettier --check \"src/**/*.js\"","oauth2":"node scripts/manual-oauth2.js","refresh-token":"node scripts/refresh-token.js","test-api":"node scripts/test-api.js","prepublishOnly":"npm test"},"repository":{"type":"git","url":"git+https://github.com/albertogferrario/javascript-stockx-api.git"},"author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","devDependencies":{"dotenv":"^16.6.1","eslint":"^8.57.1","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-import":"^2.32.0","eslint-plugin-jest":"^29.0.1","express":"^5.1.0","jest":"^29.7.0","jest-mock-axios":"^4.7.3","open":"^10.2.0"},"dependencies":{"axios":"^1.7.2","bottleneck":"^2.19.5","cron":"^3.1.7","cron-parser":"^4.9.0"},"_id":"@albertogferrario/stockx-api@1.5.0","gitHead":"67c942b9a743769d87f525bb288fe6771f03ae60","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-7x4cKO+IXWYGcBJJjc/Y2CaMqBfhwwT7RdsthmnrCowUoeuuoS7pZuuLsYtvLhsVbFxZbrwDsxhcZ4OIVf6Ubg==","shasum":"7551aacfe3353230703fefbc685611bba1024299","tarball":"https://registry.npmjs.org/@albertogferrario/stockx-api/-/stockx-api-1.5.0.tgz","fileCount":21,"unpackedSize":39237,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCwBpPy+HdVAD6HQhRv+mHRD8uwJstFi/E4TQMO/vevuAIgbx6RGKc0ghh0WpGl8k8jnb2pBtokpCHoo+ambs9ClM8="}]},"_npmUser":{"name":"albertogferrario","email":"albertogferrario@gmail.com"},"directories":{},"maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/stockx-api_1.5.0_1761506134004_0.6044816467763163"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-23T05:06:46.556Z","modified":"2025-10-26T19:15:34.402Z","2.0.0":"2023-06-11T09:50:00.062Z","2.0.2":"2023-06-11T10:30:42.895Z","2.0.4":"2023-07-25T13:21:27.369Z","2.0.5":"2023-07-25T16:39:02.445Z","2.0.6":"2023-07-25T18:39:43.426Z","2.0.7":"2023-07-25T19:25:31.967Z","2.0.8":"2023-07-25T19:38:50.803Z","2.0.9":"2023-08-19T17:18:18.114Z","3.0.0":"2024-06-14T04:29:48.376Z","3.0.1":"2024-06-14T06:41:04.187Z","4.0.0":"2024-06-15T07:23:37.220Z","5.0.0":"2024-06-22T04:04:23.188Z","5.0.1":"2024-06-22T06:19:32.363Z","5.1.0":"2024-06-23T03:57:36.827Z","1.0.1":"2024-06-23T05:06:46.855Z","1.0.2":"2024-06-23T05:18:56.335Z","1.0.3":"2024-06-30T05:18:57.949Z","1.0.4":"2024-06-30T07:10:44.143Z","1.0.5":"2024-07-01T13:38:52.517Z","1.0.6":"2024-07-06T09:24:04.616Z","1.0.7":"2024-07-06T10:02:33.906Z","1.0.8":"2024-07-06T10:29:55.841Z","1.0.9":"2024-07-12T17:53:50.693Z","1.2.3":"2025-09-09T20:35:41.232Z","1.3.0":"2025-09-09T22:29:46.639Z","1.3.1":"2025-09-10T01:55:52.539Z","1.3.2":"2025-09-10T04:52:07.454Z","1.4.0":"2025-10-26T15:26:07.707Z","1.5.0":"2025-10-26T19:15:34.210Z"},"bugs":{"url":"https://github.com/albertogferrario/javascript-stockx-api/issues"},"author":{"name":"Alberto Giancarlo Ferrario"},"license":"ISC","homepage":"https://github.com/albertogferrario/javascript-stockx-api#readme","keywords":["stockx","api","stockx-api","sneakers","marketplace","oauth2","authentication","rate-limiting"],"repository":{"type":"git","url":"git+https://github.com/albertogferrario/javascript-stockx-api.git"},"description":"StockX Public API node package with OAuth2 helpers and rate limiting","maintainers":[{"name":"albertogferrario","email":"albertogferrario@gmail.com"}],"readme":"# StockX API\n\nNode.js wrapper for the StockX Public API with built-in OAuth2 helpers and rate limiting.\n\n[![npm version](https://badge.fury.io/js/%40albertogferrario%2Fstockx-api.svg)](https://www.npmjs.com/package/@albertogferrario/stockx-api)\n\n## Features\n\n- OAuth2 helper utilities for authentication flows\n- Automatic token refresh with request interceptors\n- Built-in rate limiting (25,000 requests/day)\n- Full TypeScript support\n- Secure token storage options\n- Promise-based async/await API\n- Comprehensive error handling\n\n## Installation\n\n```bash\nnpm install @albertogferrario/stockx-api\n```\n\n## Quick Start\n\n### Basic Usage\n\n```javascript\nconst StockxApi = require('@albertogferrario/stockx-api');\n\n// Initialize with your API key and JWT token\nconst stockxApi = new StockxApi('your-api-key', 'your-jwt-token');\n\n// Search for products\nconst results = await stockxApi.catalog.search('Jordan 1', 1, 20);\n\n// Get product by slug\nconst product = await stockxApi.catalog.getProductBySlug('air-jordan-1-retro-high-og-chicago');\n\n// Get product variants using UUID\nconst variants = await stockxApi.catalog.getVariants(product.productId);\n\n// Get market data\nconst marketData = await stockxApi.catalog.getVariantMarketData(\n  product.productId,\n  variants[0].variantId,\n  'USD'\n);\n```\n\n### Complete User Flow: Slug to Pricing\n\n**Most common scenario**: Get pricing for all sizes of a product from its slug.\n\n```javascript\nasync function getProductPricing(slug, currency = 'USD') {\n  const stockxApi = new StockxApi(apiKey, jwt);\n  \n  // Step 1: Get product details from slug\n  const product = await stockxApi.catalog.getProductBySlug(slug);\n  console.log(`Found: ${product.title}`);\n  \n  // Step 2: Get all available sizes\n  const variants = await stockxApi.catalog.getVariants(product.productId);\n  console.log(`Available sizes: ${variants.map(v => v.variantValue).join(', ')}`);\n  \n  // Step 3: Get pricing for each size\n  const pricing = [];\n  for (const variant of variants.slice(0, 5)) { // First 5 sizes\n    try {\n      const marketData = await stockxApi.catalog.getVariantMarketData(\n        product.productId,\n        variant.variantId,\n        currency\n      );\n      \n      pricing.push({\n        size: variant.variantValue,\n        lowestAsk: marketData.lowestAskAmount,\n        highestBid: marketData.highestBidAmount,\n        currency: currency\n      });\n    } catch (error) {\n      console.log(`No pricing data for size ${variant.variantValue}`);\n    }\n  }\n  \n  return { product, pricing };\n}\n\n// Usage\nconst result = await getProductPricing('nike-dunk-low-se-easter-w');\nconsole.log(result.pricing);\n// Output: [\n//   { size: '5W', lowestAsk: '178', highestBid: null, currency: 'USD' },\n//   { size: '5.5W', lowestAsk: '227', highestBid: null, currency: 'USD' },\n//   ...\n// ]\n```\n\n## Authentication\n\nStockX uses OAuth2 Authorization Code Flow. You need to:\n\n1. Register your application at [StockX Developer Portal](https://developer.stockx.com)\n2. Implement OAuth2 flow to obtain JWT tokens\n3. Use the `offline_access` scope to get refresh tokens\n\n### Easy OAuth2 Setup\n\n**Option 1: Automated OAuth Flow**\n```bash\n# Set up your credentials in .env.test first\nnode scripts/oauth2-flow.js\n```\nThis opens a browser, handles the OAuth flow automatically, and saves tokens.\n\n**Option 2: Manual OAuth Flow**\n```bash\n# For environments where callback servers can't run\nnode scripts/manual-oauth2.js\n```\nThis provides URLs to copy/paste manually.\n\n**Option 3: Token Refresh**\n```bash\n# Refresh expired tokens automatically\nnode scripts/auto-refresh.js\n```\n\n### OAuth2 Helpers (Advanced)\n\n```javascript\nconst { helpers } = require('@albertogferrario/stockx-api');\n\n// Generate authorization URL (includes required audience parameter)\nconst authUrl = helpers.auth.buildAuthUrl(\n  'https://accounts.stockx.com/oauth',\n  'your-client-id',\n  'https://your-app.com/callback',\n  ['offline_access', 'openid'],\n  'oauth-state',\n  'gateway.stockx.com'  // Required audience\n);\n\n// Parse callback URL\nconst { code } = helpers.auth.parseAuthCode(callbackUrl);\n\n// Exchange authorization code for tokens\nconst tokenResponse = await helpers.auth.exchangeAuthCode(\n  code,\n  'your-client-id',\n  'your-client-secret', \n  'https://your-app.com/callback',\n  'https://accounts.stockx.com/oauth/token'\n);\n\n// Or refresh existing tokens\nconst refreshResponse = await helpers.refresh.refreshToken(\n  refreshToken,\n  'your-client-id',\n  'your-client-secret',\n  'https://accounts.stockx.com/oauth/token',\n  'gateway.stockx.com'  // Required audience\n);\n\n// Parse token response\nconst tokens = helpers.token.parse(tokenResponse);\nconsole.log('Access Token:', tokens.accessToken);\nconsole.log('Refresh Token:', tokens.refreshToken);\nconsole.log('Expires At:', tokens.expiresAt);\n```\n\n## API Reference\n\n### Constructor\n\n```javascript\nnew StockxApi(apiKey, jwt, config)\n```\n\n- `apiKey` (string, required): Your StockX API key\n- `jwt` (string, required): JWT access token\n- `config` (object, optional): Configuration overrides\n  - `baseUrl`: API base URL (default: `https://api.stockx.com/v2`)\n  - `requestTimeout`: Request timeout in ms (default: 60000)\n  - `requestRateLimitMinTime`: Min time between requests in ms (default: 1000)\n  - `requestRateLimitReservoirAmount`: Daily request limit (default: 25000)\n  - `requestRateLimitReservoirRefreshCronExpression`: Reset schedule (default: `0 0 * * *`)\n\n### Methods\n\n#### catalog.search(query, pageNumber, pageSize)\n\nSearch for products in the StockX catalog.\n\n- `query` (string): Search query\n- `pageNumber` (number): Page number (default: 1, min: 1)\n- `pageSize` (number): Results per page (default: 10, max: 50)\n\n```javascript\nconst searchResponse = await stockxApi.catalog.search('Nike Air Max', 1, 20);\n// searchResponse contains: { count, pageSize, pageNumber, hasNextPage, products }\nconsole.log(`Found ${searchResponse.count} products`);\nconst products = searchResponse.products;\n```\n\n#### catalog.getProductBySlug(slug)\n\nGet product details by slug/urlKey. This method searches for products and returns the one with an exact `urlKey` match. This ensures you get the correct product even if the search returns similar products.\n\n- `slug` (string): Product slug/urlKey (e.g., 'nike-dunk-low-se-easter-w')\n\n```javascript\nconst product = await stockxApi.catalog.getProductBySlug('nike-dunk-low-se-easter-w');\nconsole.log(product.productId); // UUID: c318bbcc-312a-4396-9252-698c203d1dea\nconsole.log(product.urlKey); // Slug: nike-dunk-low-se-easter-w (exact match guaranteed)\n```\n\n**Note**: This method performs an exact match on the `urlKey` field to ensure accuracy. If the search returns similar products but none with the exact slug, it will throw an error rather than return a potentially incorrect product.\n\n#### catalog.getVariants(productId)\n\nGet all variants for a specific product.\n\n- `productId` (string): StockX product UUID (not slug)\n\n```javascript\n// First get the product UUID\nconst product = await stockxApi.catalog.getProductBySlug('nike-dunk-low-se-easter-w');\n// Then get variants using the UUID\nconst variants = await stockxApi.catalog.getVariants(product.productId);\n```\n\n#### catalog.getVariantMarketData(productId, variantId, currencyCode)\n\nGet market data for a specific variant.\n\n- `productId` (string): StockX product UUID (not slug)\n- `variantId` (string): Variant ID\n- `currencyCode` (string): Currency code (e.g., 'USD', 'EUR')\n\n```javascript\nconst product = await stockxApi.catalog.getProductBySlug('nike-dunk-low-se-easter-w');\nconst variants = await stockxApi.catalog.getVariants(product.productId);\nconst marketData = await stockxApi.catalog.getVariantMarketData(\n  product.productId,\n  variants[0].variantId,\n  'USD'\n);\n```\n\n#### updateJwt(jwt)\n\nUpdate the JWT token without creating a new client instance.\n\n- `jwt` (string): New JWT token\n\n```javascript\nstockxApi.updateJwt('new-jwt-token');\n```\n\n## OAuth2 Helpers\n\n### auth\n\nOAuth2 URL builders and PKCE utilities.\n\n```javascript\nconst { auth } = require('@albertogferrario/stockx-api').helpers;\n\n// Build authorization URL\nconst authUrl = auth.buildAuthUrl(baseUrl, clientId, redirectUri, scopes, state);\n\n// Generate PKCE challenge\nconst { verifier, challenge, method } = auth.generatePKCE();\n\n// Parse authorization code from callback\nconst { code, state } = auth.parseAuthCode(callbackUrl);\n\n// Build token exchange URL\nconst tokenUrl = auth.buildTokenUrl(baseUrl);\n```\n\n### token\n\nJWT token parsing and validation utilities.\n\n```javascript\nconst { token } = require('@albertogferrario/stockx-api').helpers;\n\n// Decode JWT payload (without verification)\nconst payload = token.decode(jwt);\n\n// Check if token is expired\nconst expired = token.isExpired(jwt, bufferSeconds);\n\n// Get expiration date\nconst expiryDate = token.getExpiry(jwt);\n\n// Parse OAuth2 token response\nconst parsed = token.parse(tokenResponse);\n// Returns: { accessToken, tokenType, refreshToken, scope, expiresAt }\n```\n\n### refresh\n\nAxios interceptor for automatic token refresh.\n\n```javascript\nconst { refresh } = require('@albertogferrario/stockx-api').helpers;\n\n// Create interceptor for automatic token refresh\nrefresh.createInterceptor(axiosClient, {\n  onRefresh: async () => {\n    // Refresh token and return new access token\n    const response = await refresh.refreshToken(\n      refreshToken,\n      clientId,\n      clientSecret,\n      tokenUrl\n    );\n    const { accessToken } = token.parse(response);\n    return accessToken;\n  },\n  shouldRefresh: (error) => error.response?.status === 401,\n  maxRetries: 1\n});\n\n// Helper for token refresh\nconst newTokens = await refresh.refreshToken(\n  refreshToken,\n  clientId,\n  clientSecret,\n  tokenUrl\n);\n```\n\n### storage\n\nToken storage interface with multiple implementations.\n\n```javascript\nconst { storage } = require('@albertogferrario/stockx-api').helpers;\n\n// In-memory storage (default)\nconst memoryStore = new storage.MemoryStore();\n\n// File-based storage\nconst fileStore = storage.createFileStore('./tokens.json', {\n  encrypt: true,\n  secret: 'your-encryption-secret'\n});\n\n// Custom storage implementation\nclass CustomStore extends storage.StorageInterface {\n  async get(key) { /* implementation */ }\n  async set(key, value) { /* implementation */ }\n  async delete(key) { /* implementation */ }\n  async clear() { /* implementation */ }\n}\n\n// Usage\nawait store.set('tokens', { accessToken: '...', refreshToken: '...' });\nconst tokens = await store.get('tokens');\n```\n\n## Examples\n\n### Complete OAuth2 Flow\n\n```javascript\nconst StockxApi = require('@albertogferrario/stockx-api');\nconst { helpers } = StockxApi;\nconst express = require('express');\n\nconst app = express();\nconst CLIENT_ID = 'your-client-id';\nconst CLIENT_SECRET = 'your-client-secret';\nconst REDIRECT_URI = 'http://localhost:3000/callback';\n\n// Step 1: Redirect to authorization\napp.get('/auth', (req, res) => {\n  const pkce = helpers.auth.generatePKCE();\n  req.session.verifier = pkce.verifier;\n\n  const authUrl = helpers.auth.buildAuthUrl(\n    'https://accounts.stockx.com/oauth',\n    CLIENT_ID,\n    REDIRECT_URI,\n    ['offline_access', 'openid']\n  );\n\n  res.redirect(authUrl);\n});\n\n// Step 2: Handle callback\napp.get('/callback', async (req, res) => {\n  try {\n    const { code } = helpers.auth.parseAuthCode(req.url);\n\n    // Exchange authorization code for tokens\n    const tokenResponse = await helpers.auth.exchangeAuthCode(\n      code,\n      CLIENT_ID,\n      CLIENT_SECRET,\n      REDIRECT_URI,\n      'https://accounts.stockx.com/oauth/token'\n    );\n\n    const tokens = helpers.token.parse(tokenResponse);\n\n    // Create API instance\n    const stockxApi = new StockxApi('your-api-key', tokens.accessToken);\n\n    // Store tokens securely\n    await tokenStore.set('user-123', tokens);\n\n    res.json({ success: true });\n  } catch (error) {\n    res.status(400).json({ error: error.message });\n  }\n});\n```\n\n### Automatic Token Refresh\n\n```javascript\nconst StockxApi = require('@albertogferrario/stockx-api');\nconst { helpers } = StockxApi;\n\n// Create token manager\nconst tokenStore = helpers.storage.createFileStore('./tokens.json');\n\nasync function createApiClient() {\n  const tokens = await tokenStore.get('tokens');\n  const api = new StockxApi('your-api-key', tokens.accessToken);\n\n  // Add automatic refresh\n  helpers.refresh.createInterceptor(api.client, {\n    onRefresh: async () => {\n      const newTokens = await helpers.refresh.refreshToken(\n        tokens.refreshToken,\n        CLIENT_ID,\n        CLIENT_SECRET,\n        'https://accounts.stockx.com/oauth/token'\n      );\n\n      const parsed = helpers.token.parse(newTokens);\n      await tokenStore.set('tokens', parsed);\n\n      // Update the API instance\n      api.updateJwt(parsed.accessToken);\n\n      return parsed.accessToken;\n    }\n  });\n\n  return api;\n}\n\n// Use the client\nconst api = await createApiClient();\nconst products = await api.catalog.search('Jordan 1');\n```\n\n### Token Expiry Monitoring\n\n```javascript\nconst { helpers } = StockxApi;\n\n// Check token expiry before requests\nasync function makeApiCall() {\n  const tokens = await tokenStore.get('tokens');\n\n  // Check if token expires in next 5 minutes\n  if (helpers.token.isExpired(tokens.accessToken, 300)) {\n    // Refresh token\n    const newTokens = await refreshTokens();\n    await tokenStore.set('tokens', newTokens);\n  }\n\n  const api = new StockxApi('your-api-key', tokens.accessToken);\n  return await api.catalog.search('Nike');\n}\n```\n\n## Error Handling\n\nThe API wrapper provides detailed error messages:\n\n```javascript\ntry {\n  const results = await stockxApi.catalog.search('Nike');\n} catch (error) {\n  if (error.response) {\n    // API error response\n    console.error('API Error:', error.response.status, error.response.data);\n\n    if (error.response.status === 401) {\n      // Token expired - refresh and retry\n    } else if (error.response.status === 429) {\n      // Rate limited - wait and retry\n    }\n  } else if (error.request) {\n    // Request made but no response\n    console.error('Network error:', error.message);\n  } else {\n    // Request setup error\n    console.error('Error:', error.message);\n  }\n}\n```\n\n## Rate Limiting\n\nThe package includes built-in rate limiting to comply with StockX API limits:\n\n- **Daily limit**: 25,000 requests (resets at midnight UTC)\n- **Minimum delay**: 1 second between requests\n- **Sequential processing**: Requests are queued to prevent overwhelming the API\n\nYou can monitor rate limit usage:\n\n```javascript\n// Get current reservoir count\nconst remaining = stockxApi.limiter.reservoir;\nconsole.log(`Requests remaining today: ${remaining}`);\n\n// Listen for rate limit events\nstockxApi.limiter.on('depleted', () => {\n  console.log('Rate limit reached - requests will be queued');\n});\n```\n\n## Configuration\n\n### Custom Rate Limits\n\n```javascript\nconst stockxApi = new StockxApi('api-key', 'jwt', {\n  requestRateLimitMinTime: 2000, // 2 seconds between requests\n  requestRateLimitReservoirAmount: 10000, // 10k requests per day\n  requestRateLimitReservoirRefreshCronExpression: '0 */6 * * *' // Reset every 6 hours\n});\n```\n\n### Custom Timeout\n\n```javascript\nconst stockxApi = new StockxApi('api-key', 'jwt', {\n  requestTimeout: 30000 // 30 second timeout\n});\n```\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Run unit tests\nnpm test\n\n# Run integration tests (requires API credentials)\nnpm run test:integration\n\n# Run all tests\nnpm run test:all\n\n# Run linter\nnpm run lint\n```\n\n### Integration Testing\n\nThis package includes integration tests that test against the real StockX API. To run these tests, you need valid API credentials.\n\n#### Setup\n\n1. Copy the example environment file:\n   ```bash\n   cp .env.test.example .env.test\n   ```\n\n2. Edit `.env.test` and add your StockX API credentials:\n   ```env\n   STOCKX_API_KEY=your-api-key-here\n   STOCKX_JWT_TOKEN=your-jwt-token-here\n   ```\n\n3. Run integration tests:\n   ```bash\n   npm run test:integration\n   ```\n\n#### Test Configuration\n\nThe integration tests support the following environment variables in `.env.test`:\n\n- `STOCKX_API_KEY` (required): Your StockX API key\n- `STOCKX_JWT_TOKEN` (required): Your StockX JWT token\n- `TEST_PRODUCT_SLUG` (optional): Product slug to use for testing (default: `air-jordan-1-retro-high-og-chicago-reimagined`)\n- `TEST_TIMEOUT` (optional): Test timeout in milliseconds (default: 30000)\n- `TEST_DELAY` (optional): Delay between API calls in milliseconds (default: 2000)\n\n#### Important Notes\n\n- Integration tests are automatically skipped if credentials are not provided\n- Tests include delays between API calls to respect rate limits\n- The `.env.test` file is gitignored to protect your credentials\n- Integration tests make real API calls and count against your daily rate limit\n\n## Contributing\n\nContributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.\n\n## License\n\nISC © Alberto Giancarlo Ferrario\n\n## Links\n\n- [NPM Package](https://www.npmjs.com/package/@albertogferrario/stockx-api)\n- [GitHub Repository](https://github.com/albertogferrario/javascript-stockx-api)\n- [StockX Developer Portal](https://developer.stockx.com)\n- [Example Project](https://github.com/albertogferrario/javascript-stockx-api-example)\n","readmeFilename":"README.md"}