diff --git a/package-lock.json b/package-lock.json index 6823e1402..face5d3cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1440,33 +1440,33 @@ } }, "@pollyjs/adapter": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@pollyjs/adapter/-/adapter-5.0.0.tgz", - "integrity": "sha512-GaJUp9hKKKbRbh1FDbjVfxNGIYs8/1QQI5SR+zjz+OjpjV2btRPFCq1cqO4ORrHA2pTIC8IvEL3lgPSG4v/cPg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@pollyjs/adapter/-/adapter-5.1.1.tgz", + "integrity": "sha512-4Ju6batDrkqyhYFhmKhjDTIbkfj0p0kZslCQ/saA1JMWIqlFnrXMiJVCSVlwNEsej3Zt/n9JfU5mEzbXxi+3vg==", "dev": true, "requires": { - "@pollyjs/utils": "^5.0.0" + "@pollyjs/utils": "^5.1.1" } }, "@pollyjs/adapter-node-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@pollyjs/adapter-node-http/-/adapter-node-http-5.1.0.tgz", - "integrity": "sha512-3G2oYzSrHOGkHhDST/s3zj0luR6nQUfuLkZekYpNBNTIDZIreaOlNiwG7DAqB1YboGxFeQWKTMoqYu33cK2qYA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@pollyjs/adapter-node-http/-/adapter-node-http-5.1.1.tgz", + "integrity": "sha512-hN4pemkI4Wb+jAloezZrKDCqQUAlIXcgRXtrG6CZseE14QVQ8zl2I1RakUnEHBgeRWtvl5ve6uJrFNGdE8mrLA==", "dev": true, "requires": { - "@pollyjs/adapter": "^5.0.0", - "@pollyjs/utils": "^5.0.0", + "@pollyjs/adapter": "^5.1.1", + "@pollyjs/utils": "^5.1.1", "lodash-es": "^4.17.11", "nock": "^12.0.3" } }, "@pollyjs/core": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@pollyjs/core/-/core-5.1.0.tgz", - "integrity": "sha512-t29uNtc8Jq9MX3md+QgsfDtmsad9zLfKWiH33JdJjSilETWGPoq90xuMmWSXoXQCfIEVhIQ9rPEIvcmFpyqGCg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@pollyjs/core/-/core-5.1.1.tgz", + "integrity": "sha512-MggjU1GT0SP8bPRoqvL2QZ0GhJABwGb1E21+Duv08v8HqGtesN0XEZBZxVsXhspqwAKI6oOrB7767a2TOptT1g==", "dev": true, "requires": { - "@pollyjs/utils": "^5.0.0", + "@pollyjs/utils": "^5.1.1", "@sindresorhus/fnv1a": "^1.2.0", "blueimp-md5": "^2.10.0", "fast-json-stable-stringify": "^2.0.0", @@ -1477,12 +1477,12 @@ } }, "@pollyjs/node-server": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@pollyjs/node-server/-/node-server-5.0.0.tgz", - "integrity": "sha512-DK1hqsZnIU7TXECNPI6E+ojaSpv62lt3+8eGn3qFbsa61ToTFQLFEMNfcTWA6ZXArrpdzYAdKVTt8BsdEujHkg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@pollyjs/node-server/-/node-server-5.1.1.tgz", + "integrity": "sha512-4QatoXWk2fuDTfxXcdIpswkL0/1J9r6WWQ0R0xfVg/N+VM5gBHIuUNMMDX0j7SbzUiQyZNTXgSAR1FKMO+MDWA==", "dev": true, "requires": { - "@pollyjs/utils": "^5.0.0", + "@pollyjs/utils": "^5.1.1", "body-parser": "^1.19.0", "cors": "^2.8.5", "express": "^4.17.1", @@ -1493,12 +1493,12 @@ } }, "@pollyjs/persister": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@pollyjs/persister/-/persister-5.0.0.tgz", - "integrity": "sha512-bTJes0c2/y4xrXi1vPypJhup/N/VPC1jY7maOuSv4pOFo6VAvoVJGT2sgMMnPU7qHSRn9Y6v+S7QqGtLOZCyAA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@pollyjs/persister/-/persister-5.1.1.tgz", + "integrity": "sha512-AfRxvGQaEIiXxl2LjS81LJSx2x756gp4bqjEAggHsFXpYwAK+SNqSOxD/pknNV+SuxRGjNIB+GCVlh7L5Mikow==", "dev": true, "requires": { - "@pollyjs/utils": "^5.0.0", + "@pollyjs/utils": "^5.1.1", "bowser": "^2.4.0", "fast-json-stable-stringify": "^2.0.0", "lodash-es": "^4.17.11", @@ -1507,19 +1507,19 @@ } }, "@pollyjs/persister-fs": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@pollyjs/persister-fs/-/persister-fs-5.0.0.tgz", - "integrity": "sha512-ju75JJ6sSJ/q68rB74wxIlvXCq/riuCqW3pS/Ucd4SFfks/HxXxM3yGTHn0Qq5SrmY9cYbQFfpOz0WCNDIqr+A==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@pollyjs/persister-fs/-/persister-fs-5.1.1.tgz", + "integrity": "sha512-VxAsBC4fAqfQlyTf2Qb8baquUEm/9KGvCEMG1IgGhkF9xeVOEk8WZHAdmX+ejz0gocVB+1uqsA6MZQACWNxYAA==", "dev": true, "requires": { - "@pollyjs/node-server": "^5.0.0", - "@pollyjs/persister": "^5.0.0" + "@pollyjs/node-server": "^5.1.1", + "@pollyjs/persister": "^5.1.1" } }, "@pollyjs/utils": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@pollyjs/utils/-/utils-5.0.0.tgz", - "integrity": "sha512-zXoR13NGR1fVoUAcKR9/8AYCXZsMkG5EdvTZbR1nk5hCYJN1AR73HAKXMPsk/2vkLnBr6LWoAr3f9LjwqJOehQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@pollyjs/utils/-/utils-5.1.1.tgz", + "integrity": "sha512-Kzx4NkFJI2p2N82mCtpGZk82ArDCJUnRHPZ1mTEIkRSOwtz30N729+dbI39aS6H5oGcD8x/KAx3ZTAj3EQLxaQ==", "dev": true, "requires": { "qs": "^6.7.0", @@ -1620,36 +1620,36 @@ } }, "@scaleleap/jest-polly": { - "version": "1.5.27", - "resolved": "https://registry.npmjs.org/@scaleleap/jest-polly/-/jest-polly-1.5.27.tgz", - "integrity": "sha512-uz0yZKKV36WUBfWD7OZk/jRj420NpBDftMK63FEieGsdMGtqEaqjeOM64UPpaPS7BYC66jt/9QtLeWTPAVxZtw==", + "version": "1.5.37", + "resolved": "https://registry.npmjs.org/@scaleleap/jest-polly/-/jest-polly-1.5.37.tgz", + "integrity": "sha512-Z+yCwbaevojeS0plGlVsWv/QheuL3WSXpBuD55ZHV6P+chBlgYgwlRyMdxno+NwtfVQuDe2vfqjOwblx/Nj3ag==", "dev": true, "requires": { - "@pollyjs/adapter-node-http": "5.1.0", - "@pollyjs/core": "5.1.0", - "@pollyjs/persister-fs": "5.0.0", + "@pollyjs/adapter-node-http": "5.1.1", + "@pollyjs/core": "5.1.1", + "@pollyjs/persister-fs": "5.1.1", "@types/pollyjs__adapter-node-http": "2.0.1", "@types/pollyjs__core": "4.3.2", "@types/pollyjs__persister-fs": "2.0.1", "@types/setup-polly-jest": "0.5.1", - "ci-info": "3.1.1", - "env-var": "7.0.0", + "ci-info": "3.2.0", + "env-var": "7.0.1", "lodash.merge": "4.6.2", "setup-polly-jest": "0.9.1", "ts-is-present": "1.2.1", - "type-fest": "1.0.2" + "type-fest": "1.2.1" }, "dependencies": { "ci-info": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.1.1.tgz", - "integrity": "sha512-kdRWLBIJwdsYJWYJFtAFFYxybguqeF91qpZaggjG5Nf8QKdizFG2hjqvaTXbxFIcYbSaD74KpAXv6BSm17DHEQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz", + "integrity": "sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==", "dev": true }, "type-fest": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.0.2.tgz", - "integrity": "sha512-a720oz3Kjbp3ll0zkeN9qjRhO7I34MKMhPGQiQJAmaZQZQ1lo+NWThK322f7sXV+kTg9B1Ybt16KgBXWgteT8w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.2.1.tgz", + "integrity": "sha512-SbmIRuXhJs8KTneu77Ecylt9zuqL683tuiLYpTRil4H++eIhqCmx6ko6KAFem9dty8sOdnEiX7j4K1nRE628fQ==", "dev": true } } @@ -3269,9 +3269,9 @@ } }, "env-var": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/env-var/-/env-var-7.0.0.tgz", - "integrity": "sha512-XnoXQhg98QpSQqpBjySM3VjXGVrIvisgFbFURxAxOymarLzlcdvy6Y3qlnvZFaAp5j99qwSbRwqbrZtug/0x9w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/env-var/-/env-var-7.0.1.tgz", + "integrity": "sha512-w4iTR5nongmpSgIByBhEaMvuLZOQCyzv4IUbhZnYMSKo/X8tj9E2Wdn4ikzKNFi29K78e5eT64iQkpar+nIYzw==", "dev": true }, "error-ex": { @@ -4208,9 +4208,9 @@ } }, "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true }, "fp-ts": { @@ -8229,12 +8229,12 @@ "dev": true }, "proxy-addr": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz", - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "dev": true, "requires": { - "forwarded": "~0.1.2", + "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, @@ -8890,9 +8890,9 @@ }, "dependencies": { "object-inspect": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.2.tgz", - "integrity": "sha512-gz58rdPpadwztRrPjZE9DZLOABUpTGdcANUgOwBFO1C+HZZhePoP83M65WGDmbpwFYJSWqavbl4SgDn4k8RYTA==", + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", "dev": true } } @@ -8953,9 +8953,9 @@ } }, "slugify": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.5.0.tgz", - "integrity": "sha512-Q2UPZ2udzquy1ElHfOLILMBMqBEXkiD3wE75qtBvV+FsDdZZjUqPZ44vqLTejAVq+wLLHacOMcENnP8+ZbzmIA==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/slugify/-/slugify-1.5.3.tgz", + "integrity": "sha512-/HkjRdwPY3yHJReXu38NiusZw2+LLE2SrhkWJtmlPDB1fqFSvioYj62NkPcrKiNCgRLeGcGK7QBvr1iQwybeXw==", "dev": true }, "snapdragon": { diff --git a/package.json b/package.json index 14d39a2b6..39ba3aeb7 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "devDependencies": { "@microsoft/api-extractor": "7.8.1", "@scaleleap/config": "2.0.8", - "@scaleleap/jest-polly": "1.5.27", + "@scaleleap/jest-polly": "1.5.37", "@types/jest": "26.0.23", "@types/lodash": "4.14.170", "@types/node": "13.13.45", diff --git a/test/__recordings__/SponsoredDisplayProductAdsOperation_601652434/listProductAdsExtended_3714745039/should-retrieve-a-list-of-product-ads_1915493711/recording.har b/test/__recordings__/SponsoredDisplayProductAdsOperation_601652434/listProductAdsExtended_3714745039/should-retrieve-a-list-of-product-ads_1915493711/recording.har new file mode 100644 index 000000000..746f10344 --- /dev/null +++ b/test/__recordings__/SponsoredDisplayProductAdsOperation_601652434/listProductAdsExtended_3714745039/should-retrieve-a-list-of-product-ads_1915493711/recording.har @@ -0,0 +1,124 @@ +{ + "log": { + "_recordingName": "SponsoredDisplayProductAdsOperation/listProductAdsExtended/should retrieve a list of product ads ", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "5.1.1" + }, + "entries": [ + { + "_id": "48f7498ff9e9e6832040d993616994fe", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "name": "accept", + "value": "application/json" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "user-agent", + "value": "@scaleleap/amazon-advertising-api-sdk/0.0.0" + }, + { + "name": "amazon-advertising-api-scope", + "value": "2973802954634317" + }, + { + "name": "bidding_controls_on", + "value": "true" + }, + { + "name": "accept-encoding", + "value": "application/json" + }, + { + "name": "host", + "value": "advertising-api-test.amazon.com" + } + ], + "headersSize": 926, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://advertising-api-test.amazon.com/v2/sd/productAds/extended" + }, + "response": { + "bodySize": 217, + "content": { + "mimeType": "application/json", + "size": 217, + "text": [ + { + "adGroupId": 164444192239500, + "adId": 264577793668550, + "asin": "B07663Z46Z", + "campaignId": 169989740510339, + "creationDate": 1597768029000, + "lastUpdatedDate": 1597936390000, + "servingStatus": "CAMPAIGN_PAUSED", + "state": "archived" + } + ] + }, + "cookies": [], + "headers": [ + { + "name": "server", + "value": "Server" + }, + { + "name": "date", + "value": "Tue, 22 Jun 2021 15:08:39 GMT" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "transfer-encoding", + "value": "chunked" + }, + { + "name": "connection", + "value": "close" + }, + { + "name": "vary", + "value": "Content-Type,Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent" + }, + { + "name": "permissions-policy", + "value": "interest-cohort=()" + } + ], + "headersSize": 291, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2021-06-22T15:08:39.373Z", + "time": 376, + "timings": { + "blocked": -1, + "connect": -1, + "dns": -1, + "receive": 0, + "send": 0, + "ssl": -1, + "wait": 376 + } + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/test/__recordings__/SponsoredProductsProductAdsOperation_4197221524/listProductAdsExtended_3714745039/should-retrieve-a-list-of-product-ads_1915493711/recording.har b/test/__recordings__/SponsoredProductsProductAdsOperation_4197221524/listProductAdsExtended_3714745039/should-retrieve-a-list-of-product-ads_1915493711/recording.har new file mode 100644 index 000000000..aa1cbf2a2 --- /dev/null +++ b/test/__recordings__/SponsoredProductsProductAdsOperation_4197221524/listProductAdsExtended_3714745039/should-retrieve-a-list-of-product-ads_1915493711/recording.har @@ -0,0 +1,162 @@ +{ + "log": { + "_recordingName": "SponsoredProductsProductAdsOperation/listProductAdsExtended/should retrieve a list of product ads ", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "5.1.1" + }, + "entries": [ + { + "_id": "23b3cd7822666771e36ccaaac468af35", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "name": "accept", + "value": "application/json" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "user-agent", + "value": "@scaleleap/amazon-advertising-api-sdk/0.0.0" + }, + { + "name": "amazon-advertising-api-scope", + "value": "2984328618318898" + }, + { + "name": "bidding_controls_on", + "value": "true" + }, + { + "name": "accept-encoding", + "value": "application/json" + }, + { + "name": "host", + "value": "advertising-api-test.amazon.com" + } + ], + "headersSize": 926, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://advertising-api-test.amazon.com/v2/sp/productAds/extended" + }, + "response": { + "bodySize": 964, + "content": { + "mimeType": "application/json", + "size": 964, + "text": [ + { + "adGroupId": 109226894492069, + "adId": 2912157523831, + "campaignId": 31299234922913, + "creationDate": 1551148342000, + "lastUpdatedDate": 1551148939000, + "servingStatus": "PORTFOLIO_ENDED", + "servingStatusDetails": [], + "sku": "ABC", + "state": "archived" + }, + { + "adGroupId": 149522344269714, + "adId": 192944752071234, + "campaignId": 164069484151709, + "creationDate": 1579407292000, + "lastUpdatedDate": 1579441885000, + "servingStatus": "CAMPAIGN_PAUSED", + "servingStatusDetails": [], + "sku": "AB-RED-8675309", + "state": "archived" + }, + { + "adGroupId": 149522344269714, + "adId": 146167060436427, + "campaignId": 164069484151709, + "creationDate": 1584024046000, + "lastUpdatedDate": 1584024046000, + "servingStatus": "CAMPAIGN_PAUSED", + "servingStatusDetails": [], + "sku": "AB-RED-8675309", + "state": "enabled" + }, + { + "adGroupId": 164621261612363, + "adId": 192261097038351, + "campaignId": 31299234922913, + "creationDate": 1587657916000, + "lastUpdatedDate": 1587657916000, + "servingStatus": "PORTFOLIO_ENDED", + "servingStatusDetails": [], + "sku": "AB-RED-8675309", + "state": "enabled" + } + ] + }, + "cookies": [], + "headers": [ + { + "name": "server", + "value": "Server" + }, + { + "name": "date", + "value": "Tue, 22 Jun 2021 15:08:41 GMT" + }, + { + "name": "content-type", + "value": "application/json" + }, + { + "name": "transfer-encoding", + "value": "chunked" + }, + { + "name": "connection", + "value": "close" + }, + { + "name": "x-amz-request-id", + "value": "AFEM1AQPM153XDX6PQ8M" + }, + { + "name": "vary", + "value": "accept-encoding,Content-Type,Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent" + }, + { + "name": "permissions-policy", + "value": "interest-cohort=()" + } + ], + "headersSize": 347, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2021-06-22T15:08:40.828Z", + "time": 210, + "timings": { + "blocked": -1, + "connect": -1, + "dns": -1, + "receive": 0, + "send": 0, + "ssl": -1, + "wait": 210 + } + } + ], + "pages": [], + "version": "1.2" + } +}