[REST Clients] Add lro poller helper (#15898)
* initial commit * bring LRO in * Integrate core-client-lro into farmbeats * use core-lro for LroEngine * format and lint * update tests * edit * Update sdk/core/core-client-lro-rest/LICENSE * fix build * remove getPoller * revert change in core-client-rest's package.json * Address feedback * Only expose to end users interval and resumeFrom poller options * Update type locations and lock * updateIntervalInMs * Update surface Co-authored-by: deyaaeldeen <dealmaha@microsoft.com>
This commit is contained in:
Родитель
faad2ca3d7
Коммит
46a0f5f712
|
@ -31,6 +31,7 @@ dependencies:
|
|||
'@rush-temp/core-auth': file:projects/core-auth.tgz
|
||||
'@rush-temp/core-client': file:projects/core-client.tgz
|
||||
'@rush-temp/core-client-1': file:projects/core-client-1.tgz
|
||||
'@rush-temp/core-client-lro': file:projects/core-client-lro.tgz
|
||||
'@rush-temp/core-client-paging': file:projects/core-client-paging.tgz
|
||||
'@rush-temp/core-crypto': file:projects/core-crypto.tgz
|
||||
'@rush-temp/core-http': file:projects/core-http.tgz
|
||||
|
@ -8295,7 +8296,7 @@ packages:
|
|||
dev: false
|
||||
name: '@rush-temp/agrifood-farming'
|
||||
resolution:
|
||||
integrity: sha512-jy5iBp64p9V/NqWMdDDYUDeeBc9PBggjH5VWpZD7ZOS9Q+2V/XE8PM+hg2pm1jee4wwIGWDL1pUE1dBPUKBpFg==
|
||||
integrity: sha512-QYDpWjrRUqcEAJpA563+NP0NxM5L4B1Q5KX48hHzKo453J6K0bZVkY9uo//hE16r67n0NjQBtVVfIbMYb2CLLA==
|
||||
tarball: file:projects/agrifood-farming.tgz
|
||||
version: 0.0.0
|
||||
file:projects/ai-anomaly-detector.tgz:
|
||||
|
@ -9375,6 +9376,43 @@ packages:
|
|||
integrity: sha512-FW2bXPfNeV2JomM2pIu4xks4CHfcxeL3Eatyv+NuLLxd535xprU+TITYtWzdUAaWgiQcLykgoLe654fnzbLYoQ==
|
||||
tarball: file:projects/core-client-1.tgz
|
||||
version: 0.0.0
|
||||
file:projects/core-client-lro.tgz:
|
||||
dependencies:
|
||||
'@microsoft/api-extractor': 7.13.2
|
||||
'@types/chai': 4.2.21
|
||||
'@types/mocha': 7.0.2
|
||||
'@types/node': 12.20.16
|
||||
chai: 4.3.4
|
||||
cross-env: 7.0.3
|
||||
eslint: 7.31.0
|
||||
inherits: 2.0.4
|
||||
karma: 6.3.4
|
||||
karma-chrome-launcher: 3.1.0
|
||||
karma-coverage: 2.0.3
|
||||
karma-edge-launcher: 0.4.2_karma@6.3.4
|
||||
karma-env-preprocessor: 0.1.1
|
||||
karma-firefox-launcher: 1.3.0
|
||||
karma-ie-launcher: 1.0.0_karma@6.3.4
|
||||
karma-junit-reporter: 2.0.1_karma@6.3.4
|
||||
karma-mocha: 2.0.1
|
||||
karma-mocha-reporter: 2.2.5_karma@6.3.4
|
||||
karma-sourcemap-loader: 0.3.8
|
||||
mocha: 7.2.0
|
||||
mocha-junit-reporter: 1.23.3_mocha@7.2.0
|
||||
prettier: 2.2.1
|
||||
rimraf: 3.0.2
|
||||
rollup: 1.32.1
|
||||
sinon: 9.2.4
|
||||
tslib: 2.3.0
|
||||
typedoc: 0.15.2
|
||||
typescript: 4.2.4
|
||||
util: 0.12.4
|
||||
dev: false
|
||||
name: '@rush-temp/core-client-lro'
|
||||
resolution:
|
||||
integrity: sha512-WnaJAjvgvbzQYkLT+9ROoa6L/6u8dU9cG3dmrbJdEhzEsa9w5DcArXmp5lyLV3pI7hC2aEC8kFmLnZmAR3FtGA==
|
||||
tarball: file:projects/core-client-lro.tgz
|
||||
version: 0.0.0
|
||||
file:projects/core-client-paging.tgz:
|
||||
dependencies:
|
||||
'@microsoft/api-extractor': 7.13.2
|
||||
|
@ -12422,6 +12460,7 @@ specifiers:
|
|||
'@rush-temp/core-auth': file:./projects/core-auth.tgz
|
||||
'@rush-temp/core-client': file:./projects/core-client.tgz
|
||||
'@rush-temp/core-client-1': file:./projects/core-client-1.tgz
|
||||
'@rush-temp/core-client-lro': file:./projects/core-client-lro.tgz
|
||||
'@rush-temp/core-client-paging': file:./projects/core-client-paging.tgz
|
||||
'@rush-temp/core-crypto': file:./projects/core-crypto.tgz
|
||||
'@rush-temp/core-http': file:./projects/core-http.tgz
|
||||
|
|
|
@ -60,6 +60,10 @@
|
|||
"name": "core-client-rest",
|
||||
"path": "sdk/core/core-client-rest"
|
||||
},
|
||||
{
|
||||
"name": "core-client-lro-rest",
|
||||
"path": "sdk/core/core-client-lro-rest"
|
||||
},
|
||||
{
|
||||
"name": "ai-document-translator",
|
||||
"path": "sdk/documenttranslator/ai-document-translator-rest"
|
||||
|
|
|
@ -431,6 +431,11 @@
|
|||
"projectFolder": "sdk/core/core-amqp",
|
||||
"versionPolicyName": "core"
|
||||
},
|
||||
{
|
||||
"packageName": "@azure-rest/core-client-lro",
|
||||
"projectFolder": "sdk/core/core-client-lro-rest",
|
||||
"versionPolicyName": "core"
|
||||
},
|
||||
{
|
||||
"packageName": "@azure-rest/core-client",
|
||||
"projectFolder": "sdk/core/core-client-rest",
|
||||
|
|
|
@ -88,10 +88,12 @@
|
|||
"@azure-rest/core-client-paging": "1.0.0-beta.1",
|
||||
"@azure-rest/core-client": "1.0.0-beta.6",
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"@azure-rest/core-client-lro": "1.0.0-beta.1",
|
||||
"@azure/logger": "^1.0.0",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@azure/core-util": "^1.0.0-beta.1",
|
||||
"@azure/dev-tool": "^1.0.0",
|
||||
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
||||
"@azure/identity": "^1.1.0",
|
||||
|
|
|
@ -1,57 +1,56 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
|
||||
"query": {},
|
||||
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
|
||||
"status": 200,
|
||||
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-store, no-cache",
|
||||
"content-length": "1321",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:08 GMT",
|
||||
"expires": "-1",
|
||||
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
|
||||
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
|
||||
"pragma": "no-cache",
|
||||
"referrer-policy": "strict-origin-when-cross-origin",
|
||||
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
|
||||
"strict-transport-security": "max-age=31536000; includeSubDomains",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-ests-server": "2.1.11722.21 - NCUS ProdSlices",
|
||||
"x-ms-request-id": "e507c5b9-3df5-450d-9fb5-f3217aa80400"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"url": "https://endpoint/farmers/test-farmer-id-1622056799928/boundaries/test-boundary-id-1622056799928",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": "{\"geometry\":{\"coordinates\":[[[73.70457172393799,20.545385304358106],[73.70457172393799,20.545385304358106],[73.70448589324951,20.542411534243367],[73.70877742767334,20.541688176010233],[73.71023654937744,20.545083911372505],[73.70663166046143,20.546992723579137],[73.70457172393799,20.545385304358106]]],\"type\":\"Polygon\"},\"description\":\"Created by SDK\"}",
|
||||
"status": 201,
|
||||
"response": "{\"farmerId\":\"test-farmer-id-1622056799928\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[73.70457172393799,20.545385304358106],[73.70457172393799,20.545385304358106],[73.70448589324951,20.542411534243367],[73.70877742767334,20.541688176010233],[73.71023654937744,20.545083911372505],[73.70663166046143,20.546992723579137],[73.70457172393799,20.545385304358106]]]},\"isPrimary\":false,\"acreage\":60.40491151079627,\"id\":\"test-boundary-id-1622056799928\",\"eTag\":\"0000e60c-0000-0600-0000-60aeafd20000\",\"createdDateTime\":\"2021-05-26T20:30:10Z\",\"modifiedDateTime\":\"2021-05-26T20:30:10Z\",\"description\":\"Created by SDK\"}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-length": "612",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:10 GMT",
|
||||
"etag": "0000e60c-0000-0600-0000-60aeafd20000",
|
||||
"location": "http://endpoint/farmers/test-farmer-id-1622056799928/boundaries/test-boundary-id-1622056799928",
|
||||
"server": "nginx/1.19.1",
|
||||
"status": "201",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"x-ms-request-id": "0HM903J1GUND7:00000001",
|
||||
"x-ms-throttle-information": "5"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
|
||||
"query": {},
|
||||
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
|
||||
"status": 200,
|
||||
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-store, no-cache",
|
||||
"content-length": "1321",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Tue, 22 Jun 2021 16:40:22 GMT",
|
||||
"expires": "-1",
|
||||
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
|
||||
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
|
||||
"pragma": "no-cache",
|
||||
"referrer-policy": "strict-origin-when-cross-origin",
|
||||
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
|
||||
"strict-transport-security": "max-age=31536000; includeSubDomains",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-ests-server": "2.1.11829.8 - WUS2 ProdSlices",
|
||||
"x-ms-request-id": "96fa2a2d-82b7-4522-927e-f64021caa200"
|
||||
}
|
||||
},
|
||||
"hash": "23603eccc4bc38f1bbc5b85c7ff7c679"
|
||||
}
|
||||
{
|
||||
"method": "PATCH",
|
||||
"url": "https://endpoint/farmers/tst103browser/boundaries/jhboundary103browser",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": "{\"geometry\":{\"coordinates\":[[[-6.6730517,43.5298824],[-6.676265,43.5262614],[-6.6757983,43.5260669],[-6.6760236,43.5254835],[-6.6768819,43.5245228],[-6.6760075,43.5243322],[-6.6753209,43.5252112],[-6.6744518,43.5247095],[-6.6730678,43.525114],[-6.6723222,43.5256702],[-6.6739959,43.5264753],[-6.6726387,43.5274282],[-6.6712493,43.5279261],[-6.6703159,43.5280428],[-6.6693288,43.5277394],[-6.6692644,43.52807],[-6.6694576,43.5282256],[-6.671319,43.5294274],[-6.6717964,43.5296024],[-6.6730303,43.5298824],[-6.6730517,43.5298824]]],\"type\":\"Polygon\"},\"description\":\"Created by SDK\"}",
|
||||
"status": 201,
|
||||
"response": "{\"farmerId\":\"tst103browser\",\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[-6.6730517,43.5298824],[-6.676265,43.5262614],[-6.6757983,43.5260669],[-6.6760236,43.5254835],[-6.6768819,43.5245228],[-6.6760075,43.5243322],[-6.6753209,43.5252112],[-6.6744518,43.5247095],[-6.6730678,43.525114],[-6.6723222,43.5256702],[-6.6739959,43.5264753],[-6.6726387,43.5274282],[-6.6712493,43.5279261],[-6.6703159,43.5280428],[-6.6693288,43.5277394],[-6.6692644,43.52807],[-6.6694576,43.5282256],[-6.671319,43.5294274],[-6.6717964,43.5296024],[-6.6730303,43.5298824],[-6.6730517,43.5298824]]]},\"isPrimary\":false,\"acreage\":34.26834080209858,\"id\":\"jhboundary103browser\",\"eTag\":\"0300db7f-0000-0600-0000-60d212770000\",\"createdDateTime\":\"2021-06-22T16:40:23Z\",\"modifiedDateTime\":\"2021-06-22T16:40:23Z\",\"description\":\"Created by SDK\"}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-length": "809",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Tue, 22 Jun 2021 16:40:23 GMT",
|
||||
"etag": "0300db7f-0000-0600-0000-60d212770000",
|
||||
"location": "http://endpoint/farmers/tst103browser/boundaries/jhboundary103browser",
|
||||
"status": "201",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"x-ms-request-id": "0HM9KPK8BCNOU:00000002",
|
||||
"x-ms-throttle-information": "5"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "9e6267893d044c2b0cac28dcd69e5a18"
|
||||
}
|
|
@ -1,57 +1,56 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
|
||||
"query": {},
|
||||
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
|
||||
"status": 200,
|
||||
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-store, no-cache",
|
||||
"content-length": "1321",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:05 GMT",
|
||||
"expires": "-1",
|
||||
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
|
||||
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
|
||||
"pragma": "no-cache",
|
||||
"referrer-policy": "strict-origin-when-cross-origin",
|
||||
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
|
||||
"strict-transport-security": "max-age=31536000; includeSubDomains",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-ests-server": "2.1.11722.21 - SCUS ProdSlices",
|
||||
"x-ms-request-id": "79ecaf5a-c4e8-485d-b0df-c5f98ce70500"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "PATCH",
|
||||
"url": "https://endpoint/farmers/test-farmer-id-1622056799928",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": "{\"name\":\"Contoso Farmer\",\"description\":\"Your custom farmer description here\",\"status\":\"Active\",\"properties\":{\"1\":\"numeric key\",\"foo\":\"bar\",\"numeric one\":1}}",
|
||||
"status": 201,
|
||||
"response": "{\"id\":\"test-farmer-id-1622056799928\",\"eTag\":\"0000e40c-0000-0600-0000-60aeafcf0000\",\"status\":\"Active\",\"createdDateTime\":\"2021-05-26T20:30:07Z\",\"modifiedDateTime\":\"2021-05-26T20:30:07Z\",\"name\":\"Contoso Farmer\",\"description\":\"Your custom farmer description here\",\"properties\":{\"1\":\"numeric key\",\"foo\":\"bar\",\"numeric one\":1}}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-length": "323",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:07 GMT",
|
||||
"etag": "0000e40c-0000-0600-0000-60aeafcf0000",
|
||||
"location": "http://endpoint/farmers/test-farmer-id-1622056799928",
|
||||
"server": "nginx/1.19.1",
|
||||
"status": "201",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"x-ms-request-id": "0HM903JA9C7EC:00000001",
|
||||
"x-ms-throttle-information": "5"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
|
||||
"query": {},
|
||||
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
|
||||
"status": 200,
|
||||
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-store, no-cache",
|
||||
"content-length": "1321",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Tue, 22 Jun 2021 16:40:20 GMT",
|
||||
"expires": "-1",
|
||||
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
|
||||
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
|
||||
"pragma": "no-cache",
|
||||
"referrer-policy": "strict-origin-when-cross-origin",
|
||||
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
|
||||
"strict-transport-security": "max-age=31536000; includeSubDomains",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-ests-server": "2.1.11829.8 - WUS2 ProdSlices",
|
||||
"x-ms-request-id": "e20c8fdc-9d80-4c19-ae0e-d0dd585da000"
|
||||
}
|
||||
},
|
||||
"hash": "1ecab97798ad95f3c55d98e99c5c7530"
|
||||
}
|
||||
{
|
||||
"method": "PATCH",
|
||||
"url": "https://endpoint/farmers/tst103browser",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": "{\"name\":\"Contoso Farmer\",\"description\":\"Your custom farmer description here\",\"status\":\"Active\",\"properties\":{\"1\":\"numeric key\",\"foo\":\"bar\",\"numeric one\":1}}",
|
||||
"status": 201,
|
||||
"response": "{\"id\":\"tst103browser\",\"eTag\":\"0300d97f-0000-0600-0000-60d212750000\",\"status\":\"Active\",\"createdDateTime\":\"2021-06-22T16:40:21Z\",\"modifiedDateTime\":\"2021-06-22T16:40:21Z\",\"name\":\"Contoso Farmer\",\"description\":\"Your custom farmer description here\",\"properties\":{\"1\":\"numeric key\",\"foo\":\"bar\",\"numeric one\":1}}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-length": "306",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Tue, 22 Jun 2021 16:40:21 GMT",
|
||||
"etag": "0300d97f-0000-0600-0000-60d212750000",
|
||||
"location": "http://endpoint/farmers/tst103browser",
|
||||
"status": "201",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"x-ms-request-id": "0HM9KPLM6VFNC:00000002",
|
||||
"x-ms-throttle-information": "5"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "d1929a7286482e55ced92171c6061cea"
|
||||
}
|
|
@ -1,149 +1,78 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
|
||||
"query": {},
|
||||
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
|
||||
"status": 200,
|
||||
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-store, no-cache",
|
||||
"content-length": "1321",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:09 GMT",
|
||||
"expires": "-1",
|
||||
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
|
||||
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
|
||||
"pragma": "no-cache",
|
||||
"referrer-policy": "strict-origin-when-cross-origin",
|
||||
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
|
||||
"strict-transport-security": "max-age=31536000; includeSubDomains",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-ests-server": "2.1.11722.21 - SCUS ProdSlices",
|
||||
"x-ms-request-id": "79ecaf5a-c4e8-485d-b0df-c5f921e80500"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "PUT",
|
||||
"url": "https://endpoint/scenes/satellite/ingest-data/test-job-id-1622056799928",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": "{\"farmerId\":\"test-farmer-id-1622056799928\",\"boundaryId\":\"test-boundary-id-1622056799928\",\"startDateTime\":\"2020-02-01T08:00:00.000Z\",\"endDateTime\":\"2020-03-02T08:00:00.000Z\",\"data\":{\"imageNames\":[\"LAI\"]}}",
|
||||
"status": 202,
|
||||
"response": "{\"farmerId\":\"test-farmer-id-1622056799928\",\"boundaryId\":\"test-boundary-id-1622056799928\",\"startDateTime\":\"2020-02-01T08:00:00Z\",\"endDateTime\":\"2020-03-02T08:00:00Z\",\"provider\":\"Microsoft\",\"source\":\"Sentinel_2_L2A\",\"data\":{\"imageNames\":[\"LAI\"],\"imageFormats\":[\"TIF\"],\"imageResolutions\":[10.0]},\"id\":\"test-job-id-1622056799928\",\"status\":\"Waiting\",\"message\":\"Created job 'test-job-id-1622056799928' to fetch satellite data for boundary 'test-boundary-id-1622056799928' from startDate '02/01/2020' to endDate '03/02/2020' (both inclusive).\",\"createdDateTime\":\"2021-05-26T20:30:11Z\",\"lastActionDateTime\":\"2021-05-26T20:30:11Z\",\"startTime\":\"2021-05-26T20:30:11Z\"}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-length": "667",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:11 GMT",
|
||||
"location": "https://endpoint/scenes/satellite/ingest-data/test-job-id-1622056799928?api-version=2021-03-31-preview",
|
||||
"operation-location": "https://endpoint/scenes/satellite/ingest-data/test-job-id-1622056799928?api-version=2021-03-31-preview",
|
||||
"server": "nginx/1.19.1",
|
||||
"status": "202",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"x-ms-request-id": "0HM903JASEQ5F:00000001",
|
||||
"x-ms-throttle-information": "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://endpoint/scenes/satellite/ingest-data/test-job-id-1622056799928",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"farmerId\":\"test-farmer-id-1622056799928\",\"boundaryId\":\"test-boundary-id-1622056799928\",\"startDateTime\":\"2020-02-01T08:00:00Z\",\"endDateTime\":\"2020-03-02T08:00:00Z\",\"provider\":\"Microsoft\",\"source\":\"Sentinel_2_L2A\",\"data\":{\"imageNames\":[\"LAI\"],\"imageFormats\":[\"TIF\"],\"imageResolutions\":[10.0]},\"id\":\"test-job-id-1622056799928\",\"status\":\"Waiting\",\"message\":\"Created job 'test-job-id-1622056799928' to fetch satellite data for boundary 'test-boundary-id-1622056799928' from startDate '02/01/2020' to endDate '03/02/2020' (both inclusive).\",\"createdDateTime\":\"2021-05-26T20:30:11Z\",\"lastActionDateTime\":\"2021-05-26T20:30:11Z\",\"startTime\":\"2021-05-26T20:30:11Z\"}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-encoding": "gzip",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:11 GMT",
|
||||
"server": "nginx/1.19.1",
|
||||
"status": "200",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"vary": "Accept-Encoding",
|
||||
"x-ms-request-id": "0HM903JCGNAKH:00000001",
|
||||
"x-ms-throttle-information": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://endpoint/scenes/satellite/ingest-data/test-job-id-1622056799928",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"farmerId\":\"test-farmer-id-1622056799928\",\"boundaryId\":\"test-boundary-id-1622056799928\",\"startDateTime\":\"2020-02-01T08:00:00Z\",\"endDateTime\":\"2020-03-02T08:00:00Z\",\"provider\":\"Microsoft\",\"source\":\"Sentinel_2_L2A\",\"data\":{\"imageNames\":[\"LAI\"],\"imageFormats\":[\"TIF\"],\"imageResolutions\":[10.0]},\"id\":\"test-job-id-1622056799928\",\"status\":\"Running\",\"message\":\"Created job 'test-job-id-1622056799928' to fetch satellite data for boundary 'test-boundary-id-1622056799928' from startDate '02/01/2020' to endDate '03/02/2020' (both inclusive).\",\"createdDateTime\":\"2021-05-26T20:30:11Z\",\"lastActionDateTime\":\"2021-05-26T20:30:14Z\",\"startTime\":\"2021-05-26T20:30:11Z\"}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-encoding": "gzip",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:17 GMT",
|
||||
"server": "nginx/1.19.1",
|
||||
"status": "200",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"vary": "Accept-Encoding",
|
||||
"x-ms-request-id": "0HM903J1GUND7:00000002",
|
||||
"x-ms-throttle-information": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://endpoint/scenes/satellite/ingest-data/test-job-id-1622056799928",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"farmerId\":\"test-farmer-id-1622056799928\",\"boundaryId\":\"test-boundary-id-1622056799928\",\"startDateTime\":\"2020-02-01T08:00:00Z\",\"endDateTime\":\"2020-03-02T08:00:00Z\",\"provider\":\"Microsoft\",\"source\":\"Sentinel_2_L2A\",\"data\":{\"imageNames\":[\"LAI\"],\"imageFormats\":[\"TIF\"],\"imageResolutions\":[10.0]},\"id\":\"test-job-id-1622056799928\",\"status\":\"Running\",\"message\":\"Created job 'test-job-id-1622056799928' to fetch satellite data for boundary 'test-boundary-id-1622056799928' from startDate '02/01/2020' to endDate '03/02/2020' (both inclusive).\",\"createdDateTime\":\"2021-05-26T20:30:11Z\",\"lastActionDateTime\":\"2021-05-26T20:30:14Z\",\"startTime\":\"2021-05-26T20:30:11Z\"}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-encoding": "gzip",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:23 GMT",
|
||||
"server": "nginx/1.19.1",
|
||||
"status": "200",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"vary": "Accept-Encoding",
|
||||
"x-ms-request-id": "0HM903J177QF7:00000002",
|
||||
"x-ms-throttle-information": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://endpoint/scenes/satellite/ingest-data/test-job-id-1622056799928",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"farmerId\":\"test-farmer-id-1622056799928\",\"boundaryId\":\"test-boundary-id-1622056799928\",\"startDateTime\":\"2020-02-01T08:00:00Z\",\"endDateTime\":\"2020-03-02T08:00:00Z\",\"provider\":\"Microsoft\",\"source\":\"Sentinel_2_L2A\",\"data\":{\"imageNames\":[\"LAI\"],\"imageFormats\":[\"TIF\"],\"imageResolutions\":[10.0]},\"id\":\"test-job-id-1622056799928\",\"status\":\"Succeeded\",\"durationInSeconds\":13.2577861,\"message\":\"Satellite data is available for 12 days from provider in the requested date range. Successfully fetched data for 12 days.\",\"createdDateTime\":\"2021-05-26T20:30:11Z\",\"lastActionDateTime\":\"2021-05-26T20:30:24Z\",\"startTime\":\"2021-05-26T20:30:11Z\",\"endTime\":\"2021-05-26T20:30:24Z\"}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-encoding": "gzip",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:29 GMT",
|
||||
"server": "nginx/1.19.1",
|
||||
"status": "200",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"vary": "Accept-Encoding",
|
||||
"x-ms-request-id": "0HM903JA9C7EC:00000002",
|
||||
"x-ms-throttle-information": "1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
|
||||
"query": {},
|
||||
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
|
||||
"status": 200,
|
||||
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-store, no-cache",
|
||||
"content-length": "1321",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Tue, 22 Jun 2021 16:40:23 GMT",
|
||||
"expires": "-1",
|
||||
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
|
||||
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
|
||||
"pragma": "no-cache",
|
||||
"referrer-policy": "strict-origin-when-cross-origin",
|
||||
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
|
||||
"strict-transport-security": "max-age=31536000; includeSubDomains",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-ests-server": "2.1.11829.8 - NCUS ProdSlices",
|
||||
"x-ms-request-id": "135e7ff1-47ec-4995-975f-228607c89800"
|
||||
}
|
||||
},
|
||||
"hash": "66f78fa8754ef1c93f5747a53db9866f"
|
||||
}
|
||||
{
|
||||
"method": "PUT",
|
||||
"url": "https://endpoint/scenes/satellite/ingest-data/jhjob103browser",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": "{\"farmerId\":\"tst103browser\",\"boundaryId\":\"jhboundary103browser\",\"startDateTime\":\"2020-02-01T08:00:00.000Z\",\"endDateTime\":\"2020-03-02T08:00:00.000Z\",\"data\":{\"imageNames\":[\"LAI\"]}}",
|
||||
"status": 202,
|
||||
"response": "{\"farmerId\":\"tst103browser\",\"boundaryId\":\"jhboundary103browser\",\"startDateTime\":\"2020-02-01T08:00:00Z\",\"endDateTime\":\"2020-03-02T08:00:00Z\",\"provider\":\"Microsoft\",\"source\":\"Sentinel_2_L2A\",\"data\":{\"imageNames\":[\"LAI\"],\"imageFormats\":[\"TIF\"],\"imageResolutions\":[10.0]},\"id\":\"jhjob103browser\",\"status\":\"Waiting\",\"message\":\"Created job 'jhjob103browser' to fetch satellite data for boundary 'jhboundary103browser' from startDate '02/01/2020' to endDate '03/02/2020' (both inclusive).\",\"createdDateTime\":\"2021-06-22T16:40:24Z\",\"lastActionDateTime\":\"2021-06-22T16:40:24Z\",\"startTime\":\"2021-06-22T16:40:24Z\"}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-length": "602",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Tue, 22 Jun 2021 16:40:24 GMT",
|
||||
"location": "https://endpoint/scenes/satellite/ingest-data/jhjob103browser?api-version=2021-03-31-preview",
|
||||
"operation-location": "https://endpoint/scenes/satellite/ingest-data/jhjob103browser?api-version=2021-03-31-preview",
|
||||
"status": "202",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"x-ms-request-id": "0HM9KPK871A32:00000002",
|
||||
"x-ms-throttle-information": "5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://endpoint/scenes/satellite/ingest-data/jhjob103browser",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"farmerId\":\"tst103browser\",\"boundaryId\":\"jhboundary103browser\",\"startDateTime\":\"2020-02-01T08:00:00Z\",\"endDateTime\":\"2020-03-02T08:00:00Z\",\"provider\":\"Microsoft\",\"source\":\"Sentinel_2_L2A\",\"data\":{\"imageNames\":[\"LAI\"],\"imageFormats\":[\"TIF\"],\"imageResolutions\":[10.0]},\"id\":\"jhjob103browser\",\"status\":\"Waiting\",\"message\":\"Created job 'jhjob103browser' to fetch satellite data for boundary 'jhboundary103browser' from startDate '02/01/2020' to endDate '03/02/2020' (both inclusive).\",\"createdDateTime\":\"2021-06-22T16:40:24Z\",\"lastActionDateTime\":\"2021-06-22T16:40:24Z\",\"startTime\":\"2021-06-22T16:40:24Z\"}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-encoding": "gzip",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Tue, 22 Jun 2021 16:40:24 GMT",
|
||||
"status": "200",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"vary": "Accept-Encoding",
|
||||
"x-ms-request-id": "0HM9KPKHE6B0S:00000002",
|
||||
"x-ms-throttle-information": "1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "ed5645ee7eba24921d87a22885ac34a7"
|
||||
}
|
|
@ -1,56 +1,55 @@
|
|||
{
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
|
||||
"query": {},
|
||||
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
|
||||
"status": 200,
|
||||
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-store, no-cache",
|
||||
"content-length": "1321",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:07 GMT",
|
||||
"expires": "-1",
|
||||
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
|
||||
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
|
||||
"pragma": "no-cache",
|
||||
"referrer-policy": "strict-origin-when-cross-origin",
|
||||
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
|
||||
"strict-transport-security": "max-age=31536000; includeSubDomains",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-ests-server": "2.1.11722.21 - NCUS ProdSlices",
|
||||
"x-ms-request-id": "d329dfb7-ebbb-4234-97a9-8dcf96cc0500"
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://endpoint/farmers/test-farmer-id-1622056799928",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"id\":\"test-farmer-id-1622056799928\",\"eTag\":\"0000e40c-0000-0600-0000-60aeafcf0000\",\"status\":\"Active\",\"createdDateTime\":\"2021-05-26T20:30:07Z\",\"modifiedDateTime\":\"2021-05-26T20:30:07Z\",\"name\":\"Contoso Farmer\",\"description\":\"Your custom farmer description here\",\"properties\":{\"1\":\"numeric key\",\"foo\":\"bar\",\"numeric one\":1}}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-encoding": "gzip",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Wed, 26 May 2021 20:30:08 GMT",
|
||||
"server": "nginx/1.19.1",
|
||||
"status": "200",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"vary": "Accept-Encoding",
|
||||
"x-ms-request-id": "0HM903J177QF7:00000001",
|
||||
"x-ms-throttle-information": "1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
"recordings": [
|
||||
{
|
||||
"method": "POST",
|
||||
"url": "https://login.microsoftonline.com/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token",
|
||||
"query": {},
|
||||
"requestBody": "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F",
|
||||
"status": 200,
|
||||
"response": "{\"token_type\":\"Bearer\",\"expires_in\":86399,\"ext_expires_in\":86399,\"access_token\":\"access_token\"}",
|
||||
"responseHeaders": {
|
||||
"cache-control": "no-store, no-cache",
|
||||
"content-length": "1321",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Tue, 22 Jun 2021 16:40:21 GMT",
|
||||
"expires": "-1",
|
||||
"nel": "{\"report_to\":\"network-errors\",\"max_age\":86400,\"success_fraction\":0.001,\"failure_fraction\":1.0}",
|
||||
"p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"",
|
||||
"pragma": "no-cache",
|
||||
"referrer-policy": "strict-origin-when-cross-origin",
|
||||
"report-to": "{\"group\":\"network-errors\",\"max_age\":86400,\"endpoints\":[{\"url\":\"https://identity.nel.measure.office.net/api/report?catId=GW+estsfd+wst\"}]}",
|
||||
"strict-transport-security": "max-age=31536000; includeSubDomains",
|
||||
"x-content-type-options": "nosniff",
|
||||
"x-ms-ests-server": "2.1.11829.8 - NCUS ProdSlices",
|
||||
"x-ms-request-id": "1e87a220-4533-49cd-a63b-b57904a18a00"
|
||||
}
|
||||
},
|
||||
"hash": "e2178fafae4853e39e2097c1ce107f67"
|
||||
}
|
||||
{
|
||||
"method": "GET",
|
||||
"url": "https://endpoint/farmers/tst103browser",
|
||||
"query": {
|
||||
"api-version": "2021-03-31-preview"
|
||||
},
|
||||
"requestBody": null,
|
||||
"status": 200,
|
||||
"response": "{\"id\":\"tst103browser\",\"eTag\":\"0300d97f-0000-0600-0000-60d212750000\",\"status\":\"Active\",\"createdDateTime\":\"2021-06-22T16:40:21Z\",\"modifiedDateTime\":\"2021-06-22T16:40:21Z\",\"name\":\"Contoso Farmer\",\"description\":\"Your custom farmer description here\",\"properties\":{\"1\":\"numeric key\",\"foo\":\"bar\",\"numeric one\":1}}",
|
||||
"responseHeaders": {
|
||||
"api-deprecated-versions": "2020-12-31-preview",
|
||||
"api-supported-versions": "2021-03-31-preview",
|
||||
"content-encoding": "gzip",
|
||||
"content-type": "application/json; charset=utf-8",
|
||||
"date": "Tue, 22 Jun 2021 16:40:22 GMT",
|
||||
"status": "200",
|
||||
"strict-transport-security": "max-age=15724800; includeSubDomains",
|
||||
"vary": "Accept-Encoding",
|
||||
"x-ms-request-id": "0HM9KPQFKPIRS:00000002",
|
||||
"x-ms-throttle-information": "1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"uniqueTestInfo": {
|
||||
"uniqueName": {},
|
||||
"newDate": {}
|
||||
},
|
||||
"hash": "5eeb095bbc463c2d5e1773f2fe5ac136"
|
||||
}
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,12 +1,13 @@
|
|||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "4d4dbfc9dad07935562196a249f975f3";
|
||||
module.exports.hash = "4890ffd8acc8dcbe145ca1f8a90c6011";
|
||||
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
||||
.post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F")
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ 'Cache-Control',
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
|
||||
'Cache-Control',
|
||||
'no-store, no-cache',
|
||||
'Pragma',
|
||||
'no-cache',
|
||||
|
@ -21,39 +22,39 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
|||
'P3P',
|
||||
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
|
||||
'x-ms-request-id',
|
||||
'425c4443-000f-4a97-90d1-0af4020a0500',
|
||||
'd3787234-088b-440c-9c94-9568ea2fac00',
|
||||
'x-ms-ests-server',
|
||||
'2.1.11722.21 - EUS ProdSlices',
|
||||
'2.1.11829.8 - SCUS ProdSlices',
|
||||
'Set-Cookie',
|
||||
'fpc=AvdLD2y-oatMiFpwSkE7LmV4ycTJAwAAAAelQNgOAAAA; expires=Fri, 25-Jun-2021 20:22:34 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'fpc=AuprCnhyY41DlXA04J6n6rR4ycTJAwAAAGkJZNgOAAAA; expires=Thu, 22-Jul-2021 16:40:12 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'Set-Cookie',
|
||||
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Set-Cookie',
|
||||
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:34 GMT',
|
||||
'Tue, 22 Jun 2021 16:40:11 GMT',
|
||||
'Content-Length',
|
||||
'1321' ]);
|
||||
'1321'
|
||||
]);
|
||||
|
||||
nock('https://endpoint', {"encodedQueryParams":true})
|
||||
.patch('/farmers/test-farmer-id-1622056799928/boundaries/test-boundary-id-1622056799928', {"geometry":{"coordinates":[[[73.70457172393799,20.545385304358106],[73.70457172393799,20.545385304358106],[73.70448589324951,20.542411534243367],[73.70877742767334,20.541688176010233],[73.71023654937744,20.545083911372505],[73.70663166046143,20.546992723579137],[73.70457172393799,20.545385304358106]]],"type":"Polygon"},"description":"Created by SDK"})
|
||||
.patch('/farmers/tst103node/boundaries/jhboundary103node', {"geometry":{"coordinates":[[[-6.6730517,43.5298824],[-6.676265,43.5262614],[-6.6757983,43.5260669],[-6.6760236,43.5254835],[-6.6768819,43.5245228],[-6.6760075,43.5243322],[-6.6753209,43.5252112],[-6.6744518,43.5247095],[-6.6730678,43.525114],[-6.6723222,43.5256702],[-6.6739959,43.5264753],[-6.6726387,43.5274282],[-6.6712493,43.5279261],[-6.6703159,43.5280428],[-6.6693288,43.5277394],[-6.6692644,43.52807],[-6.6694576,43.5282256],[-6.671319,43.5294274],[-6.6717964,43.5296024],[-6.6730303,43.5298824],[-6.6730517,43.5298824]]],"type":"Polygon"},"description":"Created by SDK"})
|
||||
.query(true)
|
||||
.reply(201, {"farmerId":"test-farmer-id-1622056799928","geometry":{"type":"Polygon","coordinates":[[[73.70457172393799,20.545385304358106],[73.70457172393799,20.545385304358106],[73.70448589324951,20.542411534243367],[73.70877742767334,20.541688176010233],[73.71023654937744,20.545083911372505],[73.70663166046143,20.546992723579137],[73.70457172393799,20.545385304358106]]]},"isPrimary":false,"acreage":60.40491151079627,"id":"test-boundary-id-1622056799928","eTag":"0000cde0-0000-0600-0000-60aeae0b0000","createdDateTime":"2021-05-26T20:22:35Z","modifiedDateTime":"2021-05-26T20:22:35Z","description":"Created by SDK"}, [ 'Server',
|
||||
'nginx/1.19.1',
|
||||
.reply(201, {"farmerId":"tst103node","geometry":{"type":"Polygon","coordinates":[[[-6.6730517,43.5298824],[-6.676265,43.5262614],[-6.6757983,43.5260669],[-6.6760236,43.5254835],[-6.6768819,43.5245228],[-6.6760075,43.5243322],[-6.6753209,43.5252112],[-6.6744518,43.5247095],[-6.6730678,43.525114],[-6.6723222,43.5256702],[-6.6739959,43.5264753],[-6.6726387,43.5274282],[-6.6712493,43.5279261],[-6.6703159,43.5280428],[-6.6693288,43.5277394],[-6.6692644,43.52807],[-6.6694576,43.5282256],[-6.671319,43.5294274],[-6.6717964,43.5296024],[-6.6730303,43.5298824],[-6.6730517,43.5298824]]]},"isPrimary":false,"acreage":34.26834080209858,"id":"jhboundary103node","eTag":"0300d87f-0000-0600-0000-60d2126c0000","createdDateTime":"2021-06-22T16:40:12Z","modifiedDateTime":"2021-06-22T16:40:12Z","description":"Created by SDK"}, [
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:35 GMT',
|
||||
'Tue, 22 Jun 2021 16:40:12 GMT',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Content-Length',
|
||||
'608',
|
||||
'803',
|
||||
'Connection',
|
||||
'keep-alive',
|
||||
'etag',
|
||||
'0000cde0-0000-0600-0000-60aeae0b0000',
|
||||
'0300d87f-0000-0600-0000-60d2126c0000',
|
||||
'location',
|
||||
'http://endpoint/farmers/test-farmer-id-1622056799928/boundaries/test-boundary-id-1622056799928',
|
||||
'http://endpoint/farmers/tst103node/boundaries/jhboundary103node',
|
||||
'x-ms-request-id',
|
||||
'0HM903J1GUND6:00000001',
|
||||
'0HM9KPKHE6B0S:00000001',
|
||||
'api-supported-versions',
|
||||
'2021-03-31-preview',
|
||||
'api-deprecated-versions',
|
||||
|
@ -61,4 +62,5 @@ nock('https://endpoint', {"encodedQueryParams":true})
|
|||
'x-ms-throttle-information',
|
||||
'5',
|
||||
'Strict-Transport-Security',
|
||||
'max-age=15724800; includeSubDomains' ]);
|
||||
'max-age=15724800; includeSubDomains'
|
||||
]);
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "208fb1e6e1ffe45feb70c62dc829fb1e";
|
||||
module.exports.hash = "adfa321b39054fc240bf8b1e82d8e29c";
|
||||
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
||||
.post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F")
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ 'Cache-Control',
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
|
||||
'Cache-Control',
|
||||
'no-store, no-cache',
|
||||
'Pragma',
|
||||
'no-cache',
|
||||
|
@ -21,39 +22,39 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
|||
'P3P',
|
||||
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
|
||||
'x-ms-request-id',
|
||||
'a4f33994-b8f3-4894-92eb-198f58d70400',
|
||||
'c239eb0f-696b-4aaf-a705-0a5d00ac9b00',
|
||||
'x-ms-ests-server',
|
||||
'2.1.11722.21 - NCUS ProdSlices',
|
||||
'2.1.11829.8 - NCUS ProdSlices',
|
||||
'Set-Cookie',
|
||||
'fpc=AvdLD2y-oatMiFpwSkE7LmV4ycTJAQAAAAelQNgOAAAA; expires=Fri, 25-Jun-2021 20:22:32 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'fpc=AuprCnhyY41DlXA04J6n6rR4ycTJAQAAAGkJZNgOAAAA; expires=Thu, 22-Jul-2021 16:40:10 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'Set-Cookie',
|
||||
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Set-Cookie',
|
||||
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:31 GMT',
|
||||
'Tue, 22 Jun 2021 16:40:09 GMT',
|
||||
'Content-Length',
|
||||
'1321' ]);
|
||||
'1321'
|
||||
]);
|
||||
|
||||
nock('https://endpoint', {"encodedQueryParams":true})
|
||||
.patch('/farmers/test-farmer-id-1622056799928', {"name":"Contoso Farmer","description":"Your custom farmer description here","status":"Active","properties":{"1":"numeric key","foo":"bar","numeric one":1}})
|
||||
.patch('/farmers/tst103node', {"name":"Contoso Farmer","description":"Your custom farmer description here","status":"Active","properties":{"1":"numeric key","foo":"bar","numeric one":1}})
|
||||
.query(true)
|
||||
.reply(201, {"id":"test-farmer-id-1622056799928","eTag":"0000c3e0-0000-0600-0000-60aeae090000","status":"Active","createdDateTime":"2021-05-26T20:22:33Z","modifiedDateTime":"2021-05-26T20:22:33Z","name":"Contoso Farmer","description":"Your custom farmer description here","properties":{"1":"numeric key","foo":"bar","numeric one":1}}, [ 'Server',
|
||||
'nginx/1.19.1',
|
||||
.reply(201, {"id":"tst103node","eTag":"0300d67f-0000-0600-0000-60d2126b0000","status":"Active","createdDateTime":"2021-06-22T16:40:11Z","modifiedDateTime":"2021-06-22T16:40:11Z","name":"Contoso Farmer","description":"Your custom farmer description here","properties":{"1":"numeric key","foo":"bar","numeric one":1}}, [
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:33 GMT',
|
||||
'Tue, 22 Jun 2021 16:40:11 GMT',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Content-Length',
|
||||
'321',
|
||||
'303',
|
||||
'Connection',
|
||||
'keep-alive',
|
||||
'etag',
|
||||
'0000c3e0-0000-0600-0000-60aeae090000',
|
||||
'0300d67f-0000-0600-0000-60d2126b0000',
|
||||
'location',
|
||||
'http://endpoint/farmers/test-farmer-id-1622056799928',
|
||||
'http://endpoint/farmers/tst103node',
|
||||
'x-ms-request-id',
|
||||
'0HM903JASEQ5E:00000001',
|
||||
'0HM9KPQFKPIRS:00000001',
|
||||
'api-supported-versions',
|
||||
'2021-03-31-preview',
|
||||
'api-deprecated-versions',
|
||||
|
@ -61,4 +62,5 @@ nock('https://endpoint', {"encodedQueryParams":true})
|
|||
'x-ms-throttle-information',
|
||||
'5',
|
||||
'Strict-Transport-Security',
|
||||
'max-age=15724800; includeSubDomains' ]);
|
||||
'max-age=15724800; includeSubDomains'
|
||||
]);
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "3afaa64df3eeab28842ce1f03082e907";
|
||||
module.exports.hash = "ef90c96725e8c95905086af9bf6b09e1";
|
||||
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
||||
.post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F")
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ 'Cache-Control',
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
|
||||
'Cache-Control',
|
||||
'no-store, no-cache',
|
||||
'Pragma',
|
||||
'no-cache',
|
||||
|
@ -21,39 +22,39 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
|||
'P3P',
|
||||
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
|
||||
'x-ms-request-id',
|
||||
'8a0d8775-ec8e-4ff6-8657-133fef510500',
|
||||
'3cfbaaa6-4e1b-4920-bc95-a98c139fc700',
|
||||
'x-ms-ests-server',
|
||||
'2.1.11722.21 - SCUS ProdSlices',
|
||||
'2.1.11829.8 - EUS ProdSlices',
|
||||
'Set-Cookie',
|
||||
'fpc=AvdLD2y-oatMiFpwSkE7LmV4ycTJBAAAAAelQNgOAAAA; expires=Fri, 25-Jun-2021 20:22:36 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'fpc=AuprCnhyY41DlXA04J6n6rR4ycTJBAAAAGkJZNgOAAAA; expires=Thu, 22-Jul-2021 16:40:13 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'Set-Cookie',
|
||||
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Set-Cookie',
|
||||
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:35 GMT',
|
||||
'Tue, 22 Jun 2021 16:40:12 GMT',
|
||||
'Content-Length',
|
||||
'1321' ]);
|
||||
'1321'
|
||||
]);
|
||||
|
||||
nock('https://endpoint', {"encodedQueryParams":true})
|
||||
.put('/scenes/satellite/ingest-data/test-job-id-1622056799928', {"farmerId":"test-farmer-id-1622056799928","boundaryId":"test-boundary-id-1622056799928","startDateTime":"2020-02-01T08:00:00.000Z","endDateTime":"2020-03-02T08:00:00.000Z","data":{"imageNames":["LAI"]}})
|
||||
.put('/scenes/satellite/ingest-data/jhjob103node', {"farmerId":"tst103node","boundaryId":"jhboundary103node","startDateTime":"2020-02-01T08:00:00.000Z","endDateTime":"2020-03-02T08:00:00.000Z","data":{"imageNames":["LAI"]}})
|
||||
.query(true)
|
||||
.reply(202, {"farmerId":"test-farmer-id-1622056799928","boundaryId":"test-boundary-id-1622056799928","startDateTime":"2020-02-01T08:00:00Z","endDateTime":"2020-03-02T08:00:00Z","provider":"Microsoft","source":"Sentinel_2_L2A","data":{"imageNames":["LAI"],"imageFormats":["TIF"],"imageResolutions":[10]},"id":"test-job-id-1622056799928","status":"Waiting","message":"Created job 'test-job-id-1622056799928' to fetch satellite data for boundary 'test-boundary-id-1622056799928' from startDate '02/01/2020' to endDate '03/02/2020' (both inclusive).","createdDateTime":"2021-05-26T20:22:36Z","lastActionDateTime":"2021-05-26T20:22:36Z","startTime":"2021-05-26T20:22:36Z"}, [ 'Server',
|
||||
'nginx/1.19.1',
|
||||
.reply(202, {"farmerId":"tst103node","boundaryId":"jhboundary103node","startDateTime":"2020-02-01T08:00:00Z","endDateTime":"2020-03-02T08:00:00Z","provider":"Microsoft","source":"Sentinel_2_L2A","data":{"imageNames":["LAI"],"imageFormats":["TIF"],"imageResolutions":[10]},"id":"jhjob103node","status":"Waiting","message":"Created job 'jhjob103node' to fetch satellite data for boundary 'jhboundary103node' from startDate '02/01/2020' to endDate '03/02/2020' (both inclusive).","createdDateTime":"2021-06-22T16:40:13Z","lastActionDateTime":"2021-06-22T16:40:13Z","startTime":"2021-06-22T16:40:13Z"}, [
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:36 GMT',
|
||||
'Tue, 22 Jun 2021 16:40:13 GMT',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Content-Length',
|
||||
'657',
|
||||
'587',
|
||||
'Connection',
|
||||
'keep-alive',
|
||||
'location',
|
||||
'https://endpoint/scenes/satellite/ingest-data/test-job-id-1622056799928?api-version=2021-03-31-preview',
|
||||
'https://endpoint/scenes/satellite/ingest-data/jhjob103node?api-version=2021-03-31-preview',
|
||||
'x-ms-request-id',
|
||||
'0HM903JASEQ5E:00000002',
|
||||
'0HM9KPK8BCNOU:00000001',
|
||||
'operation-location',
|
||||
'https://endpoint/scenes/satellite/ingest-data/test-job-id-1622056799928?api-version=2021-03-31-preview',
|
||||
'https://endpoint/scenes/satellite/ingest-data/jhjob103node?api-version=2021-03-31-preview',
|
||||
'api-supported-versions',
|
||||
'2021-03-31-preview',
|
||||
'api-deprecated-versions',
|
||||
|
@ -61,15 +62,15 @@ nock('https://endpoint', {"encodedQueryParams":true})
|
|||
'x-ms-throttle-information',
|
||||
'5',
|
||||
'Strict-Transport-Security',
|
||||
'max-age=15724800; includeSubDomains' ]);
|
||||
'max-age=15724800; includeSubDomains'
|
||||
]);
|
||||
|
||||
nock('https://endpoint', {"encodedQueryParams":true})
|
||||
.get('/scenes/satellite/ingest-data/test-job-id-1622056799928')
|
||||
.get('/scenes/satellite/ingest-data/jhjob103node')
|
||||
.query(true)
|
||||
.reply(200, ["1f8b080000000000000384915d6bc2301486ff4ac84d37b09a46ecb477b221086e175b61e01089cda966b4cd484e8521fef79d5a75c8e606b9c97b9ef3f59e1dcf952bc14d354f3882c7b0fd874687512ca518c477a3d1480e7987af6c5d69e53ebfd993f21bed51397c5008a9298112a49022143214512a868910f4e68441a57f407de22ea00f67b7468323e2d164ce7a9b63d3c2d62e6bd25ea0425341b194cb991c53442b543cd97153aa353ca9123c4fdef86c3ce58b4e2b4eac2b151ee4743a39cbcfe06d51a3b155138a44572cf6143a6ffc6e575796c59a32f8ab3234c99a24eae9a92069f70e6843cd28970557ab040c2dcb01b30df38417854160cd1e2cb78e9d9c3e16b86a7cc072674b76369f0542f644d46b8c3d7438fa4d7abf47a156bf5959dc30536545edcd166ebb347fd64e7d799c28148350c6a9148994493f6e8e53288fe3acb1ec7ff630d75fc8fe0b0000ffff","0300f3bf29d391020000"], [ 'Server',
|
||||
'nginx/1.19.1',
|
||||
.reply(200, ["1f8b08000000000004038451cb6ac33010fc15a18b5b8813592ea1f8165a0281b487d650680941b1d6b1826d15691d2821ffde95f36ac8a1a083343b33bb3bdaf152b906dc4cf38ca3c744a4add5c0077c65bb562bf7d35736d5e9792178540e9f15426e1a20b51452c442c622c9c56326049d4ff28156df9052e25d91be9ddd1a0d8e6c5e4ce1acb72592d6dbce15c1fb1d5a342dd44bb99ccb0955b442c5b31d378d5ac3ab6ac0f3ec8bcf2733be181cc0a9758dc21ece67d333fc06ded61d1adb8652228662b12745587f536decea6a3fec88c43f94a1e66bea4a6d3cf523ecc9016dae192958f4571831b4ac042c2ae68951d70681856959691d3ba51834a7fbb163c44a671b764e9545428e44320ab1f6a6c720094f47543ae0772b8b15336d5177de6ce17e48531687d9ae534f62318ea5cc9371f620b2240d5f532b8f932264f13fb79febf2d3b776fb5f000000ffff","0300e7d121b44b020000"], [
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:37 GMT',
|
||||
'Tue, 22 Jun 2021 16:40:14 GMT',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Transfer-Encoding',
|
||||
|
@ -79,7 +80,7 @@ nock('https://endpoint', {"encodedQueryParams":true})
|
|||
'Vary',
|
||||
'Accept-Encoding',
|
||||
'x-ms-request-id',
|
||||
'0HM903JA9C7E9:00000001',
|
||||
'0HM9KPK871A32:00000001',
|
||||
'api-supported-versions',
|
||||
'2021-03-31-preview',
|
||||
'api-deprecated-versions',
|
||||
|
@ -89,88 +90,5 @@ nock('https://endpoint', {"encodedQueryParams":true})
|
|||
'Strict-Transport-Security',
|
||||
'max-age=15724800; includeSubDomains',
|
||||
'Content-Encoding',
|
||||
'gzip' ]);
|
||||
|
||||
nock('https://endpoint', {"encodedQueryParams":true})
|
||||
.get('/scenes/satellite/ingest-data/test-job-id-1622056799928')
|
||||
.query(true)
|
||||
.reply(200, ["1f8b08000000000000037c925d6bc2301486ff4ac84d37b09a46ecb477b221086e17ae570e91d89e6a469b8ce45418e27fdfa955876c0ab9c97b9ef3f5267b5e2857819be63ce1081ec3f61eea3c8c6229c5207e1a8d4672c83b7c6d6b932bf7fdcb9e95ff688fcae18b4248750594208514a190a18852314c84a0b3200c4cfe07ea1377057d39bbd33938225e75e6acb705362d6cedb226ed1d0c6a03e54aae66724c915ca1e2c99eeb4a6de04d55e079f2c167e3295f765a71625da5f028a7d3c9459e83b7658dda9a261489ae581e2874d9f8d3ae6f2c8b3565f0796d8c361b92a8a7a782a43d3ba00d7346b92cb8592560685901986d9927bc2c35026bf6608575ececf4a9c04de30356385bb18bf92c10b227a25e63ecb1c3c96fd2fb3d0ab5fac3dae296699395b5d73b78ecd2fc593bf5f5e344a11884324ea548a44cfa71f338a5f238ce1acbeeb2c3c5f953dc2b77f8010000ffff","03005d10c59b91020000"], [ 'Server',
|
||||
'nginx/1.19.1',
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:43 GMT',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Connection',
|
||||
'keep-alive',
|
||||
'Vary',
|
||||
'Accept-Encoding',
|
||||
'x-ms-request-id',
|
||||
'0HM903JCGNAKF:00000002',
|
||||
'api-supported-versions',
|
||||
'2021-03-31-preview',
|
||||
'api-deprecated-versions',
|
||||
'2020-12-31-preview',
|
||||
'x-ms-throttle-information',
|
||||
'1',
|
||||
'Strict-Transport-Security',
|
||||
'max-age=15724800; includeSubDomains',
|
||||
'Content-Encoding',
|
||||
'gzip' ]);
|
||||
|
||||
nock('https://endpoint', {"encodedQueryParams":true})
|
||||
.get('/scenes/satellite/ingest-data/test-job-id-1622056799928')
|
||||
.query(true)
|
||||
.reply(200, ["1f8b08000000000000037c925d6bc2301486ff4ac84d37b09a46ecb477b221086e17ae570e91d89e6a469b8ce45418e27fdfa955876c0ab9c97b9ef3f5267b5e2857819be63ce1081ec3f61eea3c8c6229c5207e1a8d4672c83b7c6d6b932bf7fdcb9e95ff688fcae18b4248750594208514a190a18852314c84a0b3200c4cfe07ea1377057d39bbd33938225e75e6acb705362d6cedb226ed1d0c6a03e54aae66724c915ca1e2c99eeb4a6de04d55e079f2c167e3295f765a71625da5f028a7d3c9459e83b7658dda9a261489ae581e2874d9f8d3ae6f2c8b3565f0796d8c361b92a8a7a782a43d3ba00d7346b92cb8592560685901986d9927bc2c35026bf6608575ececf4a9c04de30356385bb18bf92c10b227a25e63ecb1c3c96fd2fb3d0ab5fac3dae296699395b5d73b78ecd2fc593bf5f5e344a11884324ea548a44cfa71f338a5f238ce1acbeeb2c3c5f953dc2b77f8010000ffff","03005d10c59b91020000"], [ 'Server',
|
||||
'nginx/1.19.1',
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:48 GMT',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Connection',
|
||||
'keep-alive',
|
||||
'Vary',
|
||||
'Accept-Encoding',
|
||||
'x-ms-request-id',
|
||||
'0HM903J177QF5:00000001',
|
||||
'api-supported-versions',
|
||||
'2021-03-31-preview',
|
||||
'api-deprecated-versions',
|
||||
'2020-12-31-preview',
|
||||
'x-ms-throttle-information',
|
||||
'1',
|
||||
'Strict-Transport-Security',
|
||||
'max-age=15724800; includeSubDomains',
|
||||
'Content-Encoding',
|
||||
'gzip' ]);
|
||||
|
||||
nock('https://endpoint', {"encodedQueryParams":true})
|
||||
.get('/scenes/satellite/ingest-data/test-job-id-1622056799928')
|
||||
.query(true)
|
||||
.reply(200, ["1f8b08000000000000037c915f6bc23014c5bf4ac8b32d699cd5f64d1842c1ed61f6c9212336b79a91265b920a227ef7dd28baff425e72cfefdc9c9b7ba0ad701db84ad29206f02139df1325932ce79c8df27151147c4207746d7b2385db7fb297ca5fb40fc2857b11a0561da08133ce12c61396d56c52328667891818f90b1a22f70d7a7376a72438241e54e3acb76d884fd8de35d1b600139401fdc25fe67c8a8a1441d0f240552736f0283af0b47ca6f3694557837371665d27c2a95c57b36bf909bcd57d50d6442963295b1d51ba4efc6ad7ff0c1b7a1f93f44d032041c610bd13b1536516d0582351cf783a1ee613c6f201c5501e5f8c26fc00ad5500127313e589d809a5c55a0369ad23194761ef49eb6c472e7f419421610bc4c17b8fc94046335e85d9404a4e39bc6f7badf7a485d06ccf80f8da30c5908d03b4fdd84196b051c2f39ab392f37298c71d68e1c3b489f3dc62ef8ae565f7b7dbe1de6ff5387e000000ffff","030095b56bc399020000"], [ 'Server',
|
||||
'nginx/1.19.1',
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:54 GMT',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Transfer-Encoding',
|
||||
'chunked',
|
||||
'Connection',
|
||||
'keep-alive',
|
||||
'Vary',
|
||||
'Accept-Encoding',
|
||||
'x-ms-request-id',
|
||||
'0HM903JA9C7E9:00000002',
|
||||
'api-supported-versions',
|
||||
'2021-03-31-preview',
|
||||
'api-deprecated-versions',
|
||||
'2020-12-31-preview',
|
||||
'x-ms-throttle-information',
|
||||
'1',
|
||||
'Strict-Transport-Security',
|
||||
'max-age=15724800; includeSubDomains',
|
||||
'Content-Encoding',
|
||||
'gzip' ]);
|
||||
'gzip'
|
||||
]);
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "4d6f4013a831b2fa70e25b775d10fabd";
|
||||
module.exports.hash = "80af99833f85dc0620102e8d29425bf0";
|
||||
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
||||
.post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F")
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ 'Cache-Control',
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
|
||||
'Cache-Control',
|
||||
'no-store, no-cache',
|
||||
'Pragma',
|
||||
'no-cache',
|
||||
'Content-Length',
|
||||
'1321',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Expires',
|
||||
|
@ -23,25 +22,27 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
|||
'P3P',
|
||||
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
|
||||
'x-ms-request-id',
|
||||
'03e60ab3-2289-44ad-8027-0f50636c0500',
|
||||
'14ae013c-a17a-4bc7-913f-6f7a1101c300',
|
||||
'x-ms-ests-server',
|
||||
'2.1.11722.21 - SCUS ProdSlices',
|
||||
'2.1.11829.8 - EUS ProdSlices',
|
||||
'Set-Cookie',
|
||||
'fpc=AvdLD2y-oatMiFpwSkE7LmV4ycTJAgAAAAelQNgOAAAA; expires=Fri, 25-Jun-2021 20:22:33 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'fpc=AuprCnhyY41DlXA04J6n6rR4ycTJAgAAAGkJZNgOAAAA; expires=Thu, 22-Jul-2021 16:40:11 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'Set-Cookie',
|
||||
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Set-Cookie',
|
||||
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:33 GMT' ]);
|
||||
'Tue, 22 Jun 2021 16:40:11 GMT',
|
||||
'Content-Length',
|
||||
'1321'
|
||||
]);
|
||||
|
||||
nock('https://endpoint', {"encodedQueryParams":true})
|
||||
.get('/farmers/test-farmer-id-1622056799928')
|
||||
.get('/farmers/tst103node')
|
||||
.query(true)
|
||||
.reply(200, ["1f8b08000000000000038c8f414ec4300c45af12654d2437d504da1d1ac409ba815d485cb050e32a71471a8de6eeb803482cc9c272fe7f8e7f2e96b21dad601337c7ba6075945d17bc8743b81f86c13fd83b8b537c570af4a41ec1ed8d83003f5d80881161d82f4a3789b235e51f93d009554915a3607ed232d1826a79f09d8383f361f2307a3ff6fdab820b679ae93f648937f7c845b8b179be65573d634b9556212e6abff0564dda9af062bebf67fe00e603eb1e6fadbc6215420d7db19dce954d514ae613cfeacfccaabdc5fdfd5f878baeefaed72f000000ffff","030020e6633441010000"], [ 'Server',
|
||||
'nginx/1.19.1',
|
||||
.reply(200, ["1f8b08000000000004038c8fc16ac3300c865fc5f8dc80ec0c0f722b2d7b825cb69b6b2bab28b182ad0c46e9bb4f2e0c769c0fc2d2ffe99774b794ed64a58983b170467bb038c74fadc10890c3eb3280be01420ffd17207be7c3a5274a3789b237e58f49e8abf7a78a51309f35ccb4a24a1ebc5387c1fbd985e90526e73e145c39d342ff214b7cfa9cb80837366fb1ae58d521634b9536212e3ae69df76ad2de8457b33c11f3073057ac7dbdadf286550875e9bb75da577675a3646ef8adfac2acb54becfebf0a173dc33d1e3f000000ffff","03008f94ce9c2f010000"], [
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:34 GMT',
|
||||
'Tue, 22 Jun 2021 16:40:12 GMT',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Transfer-Encoding',
|
||||
|
@ -51,7 +52,7 @@ nock('https://endpoint', {"encodedQueryParams":true})
|
|||
'Vary',
|
||||
'Accept-Encoding',
|
||||
'x-ms-request-id',
|
||||
'0HM903JCGNAKF:00000001',
|
||||
'0HM9KPLM6VFNC:00000001',
|
||||
'api-supported-versions',
|
||||
'2021-03-31-preview',
|
||||
'api-deprecated-versions',
|
||||
|
@ -61,4 +62,5 @@ nock('https://endpoint', {"encodedQueryParams":true})
|
|||
'Strict-Transport-Security',
|
||||
'max-age=15724800; includeSubDomains',
|
||||
'Content-Encoding',
|
||||
'gzip' ]);
|
||||
'gzip'
|
||||
]);
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
let nock = require('nock');
|
||||
|
||||
module.exports.hash = "f869b5e56104b79ee00018b5d9c84a5c";
|
||||
module.exports.hash = "e8426a2f38a60f2e96f178aea82427b0";
|
||||
|
||||
module.exports.testInfo = {"uniqueName":{},"newDate":{}}
|
||||
|
||||
nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
||||
.post('/88888888-8888-8888-8888-888888888888/oauth2/v2.0/token', "response_type=token&grant_type=client_credentials&client_id=azure_client_id&client_secret=azure_client_secret&scope=https%3A%2F%2Fsanitized%2F")
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [ 'Cache-Control',
|
||||
.reply(200, {"token_type":"Bearer","expires_in":86399,"ext_expires_in":86399,"access_token":"access_token"}, [
|
||||
'Cache-Control',
|
||||
'no-store, no-cache',
|
||||
'Pragma',
|
||||
'no-cache',
|
||||
|
@ -21,27 +22,27 @@ nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true})
|
|||
'P3P',
|
||||
'CP="DSP CUR OTPi IND OTRi ONL FIN"',
|
||||
'x-ms-request-id',
|
||||
'22accbbc-80e1-4469-a0d9-6521361a0400',
|
||||
'19225b6f-7db1-4eb2-9f42-a531bba0bb00',
|
||||
'x-ms-ests-server',
|
||||
'2.1.11722.21 - NCUS ProdSlices',
|
||||
'2.1.11829.8 - SCUS ProdSlices',
|
||||
'Set-Cookie',
|
||||
'fpc=AvdLD2y-oatMiFpwSkE7LmV4ycTJBQAAAAelQNgOAAAA; expires=Fri, 25-Jun-2021 20:22:54 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'fpc=AlmSS2z-YcFBjjkcYPTP9Kt4ycTJAQAAAAsKZNgOAAAA; expires=Thu, 22-Jul-2021 16:42:52 GMT; path=/; secure; HttpOnly; SameSite=None',
|
||||
'Set-Cookie',
|
||||
'x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Set-Cookie',
|
||||
'stsservicecookie=estsfd; path=/; secure; samesite=none; httponly',
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:53 GMT',
|
||||
'Tue, 22 Jun 2021 16:42:52 GMT',
|
||||
'Content-Length',
|
||||
'1321' ]);
|
||||
'1321'
|
||||
]);
|
||||
|
||||
nock('https://endpoint', {"encodedQueryParams":true})
|
||||
.get('/scenes')
|
||||
.query(true)
|
||||
.reply(200, ["1f8b0800000000000003ecd65f4bc3301000f0ef52d0a7a54bd2fde90643e6c4a70d84f9a40f236d2f5b589b8c24ddd0e177f75a5091d64f60200fc9dd2577fc9e728dcea2ac219abf5e2397838607e1e15955188938e594504ef8ec99d279bb5ea24174b2e6ac0ab058b151b935ce488f61676a9b37d7b6a0bdd250eef86ecd97985195d8c3a32ac1b56d24eed64a1fb1f4e0fdc9cd8743571c890787d7f6e492d78eb0580a5b6520bc8bc57b6d21d6e087ed806e58988b2e8d28da27efc449913358a78c5ee0c48cd084248c9c2c9c155c6e9b6e4fc21f16dfb3de70f97b440c34cd49d3122c51056113cee978329dcd663cfd4a67a6d685b06f7d053f5478a0b86d166ef3b2da311a7b25d1418b9675b5dee0c1823365ed71ea688e15f463f0bf640ae14525dcb1c3d32436980846d2e5658767bb5a07199951de91b9a73cc8a04cd2239304199419f5c88c820cca8c7b64c6410665263d3293208332d31e9969904199b447260d32324b4557265d06199931d695612cc8a04ccf4f8ffdf9d3fb040000ffff","ec984f6b834010c5bf8be72eecc6c4c4dea450101ac821a7420f13774d96fa071285924fdf995d432976d2de3b1e44794f9df9f12ebe7f448646b8bace0fa7d641378344f26b90b7280bafc00baebe1def002ba22ec4e2ffe7d8c5804177c46167c4508f092b822ec488d814311ed994316136316bc0cf30bd14a59021323f566448876bc8de6e756b7f6e6140efbe7c465fd5f4a37dea71d39d3b2387012dc9233ef090e050ef3bffe19a99721bb9b4f89efb4be027e2fe5f5e86073a3d798cdd1c56da8072e9b256abd4e0cee962a936c69afab0c8abbca6df2cb78723ba351e36d395a20ba5b340084f990607cee47493503c2e5c87bd960efbaf295c7f4fa174d81c19e9b07f67241d3647463a6c9e8c74d81c19e9b03932a1c3fe040000ffff","ecd8bb0d80300c45d15de82d393856601ce7c3fe235023c5204387de0a57b73a30ec491918b6570686ed9581613b6560d85e1918b65b06863d2f03c38ef78261478ac1b05f148361079bc1b06fcafcd6b08b88a55a3bad4d0a299b52cbd68907a75d373d46e7e56ad8fac5b0330cfbe9c2130000ffff","ecd8b109002010c0c0fdb7b613840f6261772b1ca9b2a9ce0a3dec92f1b0ef461e76c978d82de361978c875d321e76c978d825e361978c871d321e76c978d829e361cf321ef6bbd7b787bd000000ffff","ecd8b90d00211004c15cce5f0304f784c32226ff10b031e67e0b4d0aadb66aca6232ec17c564d80f9bc9b04fca4c6bd8beb78a846275855bcbe1307883a55032b045f7eccb68d8e98b614719f6dd0be378a10c9b9591615f379261b332326c5e4686cdcac8b0591919362b23c366657e33ec0e0000ffff","ecdcb10dc0200c44d1892c6150c08c6391b0ff08285d8a38e094e856f872e357dc766560d8461918b65506866d968161bf978161fb7bc1b03dc560d83f8ac1b09dcd60d81f65b635ecac21c4eb48943b47e2aa4ca57721092ab595d64ebd1fd0a76127d3b0656ad88c3decd52b64ec612f968161cf1b2d18f6000000ffff","ecd8210100201000b1fead29c0897f81611526f7a98cc36e19875d320ebb641c76c938ec9271d825e3b043c661978cc34e19877d9771d8732f873d1173d80bb1b7877d000000ffff","ecdcc10d80200c85e1899a205191715a0afb8f60b8797942e2c5903742fff4d2efd0059ad1b05fca2c6bd8e1289b7b5271d328adf5f15d4dca9942beeaae56fb69fe34ecf8c5b0f90f7b7a0bf90f7bb20c0d7bdc88868dcad0b071191a362a43c3466568d8a80c0d1b95a161a332346c50e65f867d030000ffff","ecdc310a80300c85e1bbb8175a9b6a3c4ec5f4fe4768d78251a320226fc99e9f4cdf902f958161ab6560d8fb6560d8f65e306c4b3118f68d62306c633318f64199df1a76d8bcacd496ce89d8c5b1b42165724b62f23133cf2c436fd8e18961e31ff6e52ba4fe0a61d85a1918f6792318b6560686ad9779c5b02b000000ffff","ecd8310d0020100031ffae31c0913c1324b5d0b15fca38ec9271d825e3b04bc661978cc30e19875d320e3b651cf65ec661cfbd1cf644cc615f8839eca199c33ec8bc7ad80b0000ffff","ecdc3b0a80400c45d1bdd80746439c6439cec7fd2f41ec44783862276f09b9a4c929721b627a6dd8b1445d357649a5ab78984a360bd94af33c6bf566e7997535ecf4c5b0f90f7b780bf90f7bb00c0dfbb9110d1b95a161e332346c5486868dcad0b051191a362a43c3466568d8a00c0d1b95a161c332bf33ec030000ffff","ecdc410ac0200c44d11305946a271ea768bcff11ba2fa46ae9a665aef0c9ea11e6a53234ecf55e34ec956234ec07c568d88bcd68d837657e6bd8b569692126b1ae5112b0498765d9f580212315bbfc6157730d1b43c30edcc39ebdc2c03decc93234ec71231ab6578686ed97a1617b6568d85e99cf18f6090000ffff","ecdcc10980300c85e15dbc071289b6eb3429dd7f04cf8211a320226f859f9c3ec27bbd0c0c3b2a03c38ecac0b0833230eca80c0c3b2c03c33e2e03c3cef78261678ac1b06f148361279bc1b04fcafcd6b0b949f15985c416231553f26e95aaafd2cc46f7c2d3deb0c7833f6cc61ef6e52bfcf21ef6060000ffff","ecd8c10900200c00b1fdb776811ee2af6056c833ab641cf6ddc861978cc36e19875d320ebb641c76c938ec9271d825e3b043c661978cc34e19873dcb38ec77afaf0ffb000000ffff","ecdccb0980400c84e18a02d98798761275fb2f413c8a8cba7ad369e127a78f21ddc568d80f8ad1b03b9bd1b04fca7cd6b0cd162b75fb20e236886ba8642db3b488c829351f0f3bece9cd0e9bffb06f5f61dd5f210d1b95a1615f37a261a332346c5c86868dcad0b051191a362a43c346657e65d82b000000ffff","ecdcb10d80300c44d15de82d8103893c0eb193fd47801689400c5d742b7c5df58a7395816137cac0b05b6560d8cd3230ecfb32306c7f2f18b6a7180cfb433118b6b3190cfba1ccb0866dbc04563d6b57d9a9044dc4321b452b35c8baa56879ba1a76fe63d8f8c3ee5e21feb03bcbc0b0df1b0d62d807000000ffff","ecd8a10d00201000b1fdb7c67f38f124b8ae50d90f320ebb651c76c938ec9271d825e3b04bc661978cc30e19875d320e3b651cf65dc661efbd1cf646cc613f8839ec6976000000ffff","221066a363d8784266d88e612719a41a181a9aa7ea26a59a9be89a189aa7e89a1b1a24e95a9aa6a6a69a1a265b582683d4228f61a7101ac38ead05000000ffff","0300650c3be43b110100"], [ 'Server',
|
||||
'nginx/1.19.1',
|
||||
.reply(200, ["1f8b0800000000000403e4974d6ac3301085ef6268575122c9f96b209436a5ab180ac9aa5d04c51ec76a6cc948b243137af78ebd6828f6014a045a48f346d2fb062d4697a0167905c1e2e312d81814bc08075b596024e094534239e10f5b4a17ed780f064169742d13309811c9d868ab538761ab2b1337db36a09c5490eff86ecd9f50918538c0abccc1b6d7a4385b4b75c4d4ccb9d22e46239b1c89038bdb0ee4145796b0612a4cb107e1ec509c2b0343056ed41ab4a3449f54ae45d21ef9284a496a30566ab544c78cd090848c94066a09a7fbe6b637e1b2e5afd73b9efeb58801671da3a1d209e0e233dbeb4a25c27c5d63d75a6002c5b23403a7715eec181d3a9922a8126ddd56eb081706acce2b87b6820566d0efc125b829f4443851087becf0374284820f45b071dee1dfacd63ea0ef29efa03f53ee077ad8831efa813eee411ffb813ee9419ff8813eed419ffa813eeb419ff9813eef419f7b813e175df479d3cdde7c5fb767ac8bce981fe83d2d0df3a2a5693e4b6750d2650508d579008dfcdeca11cafff72dfc000000ffff","ecd8cd0a82401405e077699d300d8ee652824068d1c26d8b51c7904cc112a2a7ef8cda0fde6c55abdbc6c55c1d3897b3f1fbde9f9d4dacafc5b1fdb091b09f7359c9a9adfa8ae86a8fbf795212ccfb8e84dd9c434b107928c9f44e8696f0594aa90bd28d4d1871e803a2bf3511c49f2291dd5dc8eae6a8cf50b1385a63556959b7d9aa066d6d0d60ad3a03d1ac248192e633e0d4615b5c4cf93aeb2677ba8a32dc44240bf75a58334d377eaa17ce0bfb419e64819041ea04c6771de5b9a9a372b9747c21955e2a4f2c9204ef9a58eff1367c50a85c5b0ab31ee6752886872732b9907e628f67d6bd2665d1fdcbe243165dbeb2388ace5316474be0248ba3e89c649144e7238b243a1f5924d1f9c82289ce471649743eb248a2ff48166f000000ffff","ecdab11180300c43d1895c048203e340b0f61f818a46a1a3819347f8ba54cff9e0c598d3856491d385647148d791454a4f597c18445d16699294459bc649521679142559a4f7f073599cdbb2fb09378f1ed6aa870168b63a10e5ecb51e41b2182f64b1e49f45dcb258365959e4744959e411846491d38564714c5790c50b0000ffff","ecdbcb0d80201045d18a2641248394a37cfa2f415c69e6b17361cca3844b420287a13f4379c1741a59c4741a59c4741a59c4741a59c4741a5984741e5984741e59c4741a59b4e9f4b2385a107259b44b3265118ec37366717047209245bb457e2e8b256a289a9c44cd5edce676d156b368acc7d2c931a4f5faa8f49c592c6f6471ce2cdeb2688cfafbdfd027000000ffff","ecdba11100200cc5d08910ecbf1c3e41834847c8777d777df608be91de94458c509245a4976451e91d59547a471695de9145a5776451e91d59547a4716991e9245a6876451e91d5944fac8e26590ba2c629291c5c523f8bf2c1e000000ffff","ecdc4b0a80300c45d1151592c64fba9c6271ff4bb04e44f2104782f25cc20d747248fa822fe2e2509864313c918fcb623f865ebda8a541274d2df74368cda3a545ccbc15779bf73fbfceb2582f65b1de5e43cbbfb378c8a2f0ee2cc6744a598c432092c5984e248b984e238b984e238b984e238b984e238b984e238b984e238b90ce238b90ce238b98fe942c6e000000ffff","ecddbb0d80300c84e1892c99004a18270fd87f0442053abba3015d46f8affc14cce70ec6633abd2c7a8390cb224e3264519c49c6d7d0380a912c3ae97fbeb3b8d4186ade9a9416b3e81aba311e5a24cd7b8a79ea6718f5faa1c85316eb1b591c6f166f5904a3267ab3a890ce298b3002932c423a932c9a741e5934e93cb268d27964d1a453c8e2090000ffff","026dff47afe6920c46cec82246ac8f9c914574af8fa0914574af8fa091450caf8f9c914534af8f8e2c620990913eb2881624a3238b18ad83d1358b589a4c236964112d8b0cf1358b291686e6c916a996ba4946a696ba8916a949ba2969c616bac9a04dd2c986a6a646e6a00bfc90471693088d2cc6d602000000ffff","0300432371a4277a0000"], [
|
||||
'Date',
|
||||
'Wed, 26 May 2021 20:22:55 GMT',
|
||||
'Tue, 22 Jun 2021 16:42:53 GMT',
|
||||
'Content-Type',
|
||||
'application/json; charset=utf-8',
|
||||
'Transfer-Encoding',
|
||||
|
@ -51,14 +52,15 @@ nock('https://endpoint', {"encodedQueryParams":true})
|
|||
'Vary',
|
||||
'Accept-Encoding',
|
||||
'x-ms-request-id',
|
||||
'0HM903JASEQ5E:00000003',
|
||||
'0HM9KPK8BCNOV:00000001',
|
||||
'api-supported-versions',
|
||||
'2021-03-31-preview',
|
||||
'api-deprecated-versions',
|
||||
'2020-12-31-preview',
|
||||
'x-ms-throttle-information',
|
||||
'65',
|
||||
'35',
|
||||
'Strict-Transport-Security',
|
||||
'max-age=15724800; includeSubDomains',
|
||||
'Content-Encoding',
|
||||
'gzip' ]);
|
||||
'gzip'
|
||||
]);
|
||||
|
|
|
@ -9,6 +9,9 @@ import { ClientOptions } from '@azure-rest/core-client';
|
|||
import { HttpResponse } from '@azure-rest/core-client';
|
||||
import { PagedAsyncIterableIterator } from '@azure-rest/core-client-paging';
|
||||
import { PathUncheckedResponse } from '@azure-rest/core-client';
|
||||
import { PollerLike } from '@azure-rest/core-client-lro';
|
||||
import { PollerOptions } from '@azure-rest/core-client-lro';
|
||||
import { PollOperationState } from '@azure-rest/core-client-lro';
|
||||
import { RequestParameters } from '@azure-rest/core-client';
|
||||
import { TokenCredential } from '@azure/core-auth';
|
||||
|
||||
|
@ -1926,6 +1929,9 @@ export type GeoJsonObjectType = "Point" | "Polygon" | "MultiPolygon";
|
|||
// @public
|
||||
export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
|
||||
|
||||
// @public
|
||||
export function getPoller<TResult extends HttpResponse>(client: FarmBeatsRestClient, initialResponse: TResult, options?: PollerOptions): PollerLike<PollOperationState<TResult>, TResult>;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface HarvestData {
|
||||
area?: Measure;
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import {
|
||||
getLongRunningPoller,
|
||||
PollerLike,
|
||||
PollOperationState,
|
||||
PollerOptions,
|
||||
} from "@azure-rest/core-client-lro";
|
||||
import { HttpResponse } from "@azure-rest/core-client";
|
||||
import { FarmBeatsRestClient } from "./farmBeats";
|
||||
|
||||
/**
|
||||
* Gets a poller object to help polling for a long running operation status.
|
||||
* @param client - FarmBeats Rest Client.
|
||||
* @param initialResponse - Initial response for the operation that needs to be polled.
|
||||
* @param options - Polling options
|
||||
* @returns - Gets a poller that can be run on demand or automatically awaited until the operation is completed.
|
||||
*/
|
||||
export function getPoller<TResult extends HttpResponse>(
|
||||
client: FarmBeatsRestClient,
|
||||
initialResponse: TResult,
|
||||
options: PollerOptions = {}
|
||||
): PollerLike<PollOperationState<TResult>, TResult> {
|
||||
return getLongRunningPoller(client, initialResponse, options);
|
||||
}
|
|
@ -9,5 +9,6 @@ export * from "./parameters";
|
|||
export * from "./responses";
|
||||
|
||||
export { paginate, PaginateReturn, GetArrayType } from "./paging";
|
||||
export { getPoller } from "./getPoller";
|
||||
|
||||
export default FarmBeats;
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
import { FarmBeatsRestClient } from "../../src";
|
||||
import { isPlaybackMode, Recorder } from "@azure/test-utils-recorder";
|
||||
import { FarmBeatsRestClient, getPoller } from "../../src";
|
||||
import { Recorder } from "@azure/test-utils-recorder";
|
||||
import { isNode } from "@azure/core-util";
|
||||
|
||||
import { assert } from "chai";
|
||||
import { createClient, createRecorder } from "./utils/recordedClient";
|
||||
import { Context } from "mocha";
|
||||
import { wait } from "./utils/wait";
|
||||
|
||||
const startDateTime = new Date("2020-02-01T08:00:00.000Z");
|
||||
const endDateTime = new Date("2020-03-02T08:00:00.000Z");
|
||||
const farmerId = `test-farmer-id-1622056799928`;
|
||||
const jobId = `test-job-id-1622056799928`;
|
||||
const boundaryId = `test-boundary-id-1622056799928`;
|
||||
const suffix = isNode ? "node" : "browser";
|
||||
const farmerId = `tst103${suffix}`;
|
||||
const jobId = `jhjob103${suffix}`;
|
||||
const boundaryId = `jhboundary103${suffix}`;
|
||||
const testFarmer = {
|
||||
name: "Contoso Farmer",
|
||||
description: "Your custom farmer description here",
|
||||
|
@ -23,17 +24,10 @@ const testFarmer = {
|
|||
describe("Farmer Operations", () => {
|
||||
let recorder: Recorder;
|
||||
let client: FarmBeatsRestClient;
|
||||
let pollWaitInMs: number;
|
||||
|
||||
beforeEach(function (this: Context) {
|
||||
recorder = createRecorder(this);
|
||||
client = createClient();
|
||||
|
||||
if (isPlaybackMode()) {
|
||||
pollWaitInMs = 0;
|
||||
} else {
|
||||
pollWaitInMs = 5000;
|
||||
}
|
||||
});
|
||||
|
||||
afterEach(async function () {
|
||||
|
@ -62,13 +56,27 @@ describe("Farmer Operations", () => {
|
|||
geometry: {
|
||||
coordinates: [
|
||||
[
|
||||
[73.70457172393799, 20.545385304358106],
|
||||
[73.70457172393799, 20.545385304358106],
|
||||
[73.70448589324951, 20.542411534243367],
|
||||
[73.70877742767334, 20.541688176010233],
|
||||
[73.71023654937744, 20.545083911372505],
|
||||
[73.70663166046143, 20.546992723579137],
|
||||
[73.70457172393799, 20.545385304358106],
|
||||
[-6.6730517, 43.5298824],
|
||||
[-6.676265, 43.5262614],
|
||||
[-6.6757983, 43.5260669],
|
||||
[-6.6760236, 43.5254835],
|
||||
[-6.6768819, 43.5245228],
|
||||
[-6.6760075, 43.5243322],
|
||||
[-6.6753209, 43.5252112],
|
||||
[-6.6744518, 43.5247095],
|
||||
[-6.6730678, 43.525114],
|
||||
[-6.6723222, 43.5256702],
|
||||
[-6.6739959, 43.5264753],
|
||||
[-6.6726387, 43.5274282],
|
||||
[-6.6712493, 43.5279261],
|
||||
[-6.6703159, 43.5280428],
|
||||
[-6.6693288, 43.5277394],
|
||||
[-6.6692644, 43.52807],
|
||||
[-6.6694576, 43.5282256],
|
||||
[-6.671319, 43.5294274],
|
||||
[-6.6717964, 43.5296024],
|
||||
[-6.6730303, 43.5298824],
|
||||
[-6.6730517, 43.5298824],
|
||||
],
|
||||
],
|
||||
type: "Polygon",
|
||||
|
@ -86,7 +94,7 @@ describe("Farmer Operations", () => {
|
|||
});
|
||||
|
||||
it("should create a satelite job", async () => {
|
||||
const result = await client.path("/scenes/satellite/ingest-data/{jobId}", jobId).put({
|
||||
const initialResponse = await client.path("/scenes/satellite/ingest-data/{jobId}", jobId).put({
|
||||
body: {
|
||||
farmerId,
|
||||
boundaryId,
|
||||
|
@ -96,34 +104,14 @@ describe("Farmer Operations", () => {
|
|||
},
|
||||
});
|
||||
|
||||
if (result.status !== "202") {
|
||||
throw result.body.error;
|
||||
if (initialResponse.status !== "202") {
|
||||
throw initialResponse.body.error;
|
||||
}
|
||||
|
||||
assert.equal(result.body.farmerId, farmerId);
|
||||
const poller = getPoller(client, initialResponse);
|
||||
const result = await poller.pollUntilDone();
|
||||
|
||||
let operationStatus: string;
|
||||
|
||||
do {
|
||||
const statusResult = await client.path("/scenes/satellite/ingest-data/{jobId}", jobId).get();
|
||||
if (statusResult.status !== "200") {
|
||||
throw statusResult.body.error;
|
||||
}
|
||||
|
||||
operationStatus = statusResult.body.status ?? "Failed";
|
||||
|
||||
if (["Failed", "Cancelled"].includes(operationStatus)) {
|
||||
throw new Error("Job Failed");
|
||||
}
|
||||
|
||||
if (statusResult.body.status === "Succeeded") {
|
||||
break;
|
||||
}
|
||||
|
||||
await wait(pollWaitInMs);
|
||||
} while (["Waiting", "Running"].includes(operationStatus));
|
||||
|
||||
assert.ok("Job completed");
|
||||
assert.equal(result.body.boundaryId, boundaryId);
|
||||
});
|
||||
|
||||
it("should get corresponding scenes", async () => {
|
||||
|
@ -142,7 +130,7 @@ describe("Farmer Operations", () => {
|
|||
});
|
||||
|
||||
if (result.status !== "200") {
|
||||
throw result.body.error;
|
||||
throw new Error(`Unexpected status ${result.status}`);
|
||||
}
|
||||
|
||||
assert.ok(result.body.value?.length, "Expected to list scenes, but got nothing");
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
# Release History
|
||||
|
||||
## 1.0.0-beta.1 (UNRELEASED)
|
||||
|
||||
- First release of package, see README.md for details.
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -0,0 +1,37 @@
|
|||
# Azure Rest Core LRO library for JavaScript (Experimental)
|
||||
|
||||
This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest) and [`autorest.typescript`](https://github.com/Azure/autorest.typescript). Specifically for rest level clients, as a helper to handle long running operations. This package implements support for Autorest `x-ms-long-running-operation` specification.
|
||||
|
||||
## Getting started
|
||||
|
||||
### Requirements
|
||||
|
||||
- [Node.js](https://nodejs.org) LTS
|
||||
|
||||
### Installation
|
||||
|
||||
This package is primarily used in generated code and not meant to be consumed directly by end users.
|
||||
|
||||
## Key concepts
|
||||
|
||||
### Helper function `getLongRunningPoller`
|
||||
|
||||
## Examples
|
||||
|
||||
Examples can be found in the `samples` folder.
|
||||
|
||||
## Next steps
|
||||
|
||||
You can build and run the tests locally by executing `rushx test`. Explore the `test` folder to see advanced usage and behavior of the public classes.
|
||||
|
||||
Learn more about [AutoRest](https://github.com/Azure/autorest) and the [autorest.typescript extension](https://github.com/Azure/autorest.typescript) for generating a compatible client on top of this package.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you run into issues while using this library, please feel free to [file an issue](https://github.com/Azure/azure-sdk-for-js/issues/new).
|
||||
|
||||
## Contributing
|
||||
|
||||
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.
|
||||
|
||||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcore-rest%2Fcore-client%2FREADME.png)
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "types/latest/src/index.d.ts",
|
||||
"docModel": {
|
||||
"enabled": true
|
||||
},
|
||||
"apiReport": {
|
||||
"enabled": true,
|
||||
"reportFolder": "./review"
|
||||
},
|
||||
"dtsRollup": {
|
||||
"enabled": true,
|
||||
"untrimmedFilePath": "",
|
||||
"publicTrimmedFilePath": "./types/latest/core-client-lro-rest.d.ts"
|
||||
},
|
||||
"messages": {
|
||||
"tsdocMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
},
|
||||
"extractorMessageReporting": {
|
||||
"ae-missing-release-tag": {
|
||||
"logLevel": "none"
|
||||
},
|
||||
"ae-unresolved-link": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
// https://github.com/karma-runner/karma-chrome-launcher
|
||||
process.env.CHROME_BIN = require("puppeteer").executablePath();
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
// base path that will be used to resolve all patterns (eg. files, exclude)
|
||||
basePath: "./",
|
||||
|
||||
// frameworks to use
|
||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||
frameworks: ["mocha"],
|
||||
|
||||
plugins: [
|
||||
"karma-mocha",
|
||||
"karma-mocha-reporter",
|
||||
"karma-chrome-launcher",
|
||||
"karma-edge-launcher",
|
||||
"karma-firefox-launcher",
|
||||
"karma-ie-launcher",
|
||||
"karma-env-preprocessor",
|
||||
"karma-coverage",
|
||||
"karma-sourcemap-loader",
|
||||
"karma-junit-reporter",
|
||||
],
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
// Uncomment the cdn link below for the polyfill service to support IE11 missing features
|
||||
// Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys
|
||||
// "https://cdn.polyfill.io/v2/polyfill.js?features=Symbol,Promise,String.prototype.startsWith,String.prototype.endsWith,String.prototype.repeat,String.prototype.includes,Array.prototype.includes,Object.keys|always",
|
||||
"dist-test/index.browser.js",
|
||||
],
|
||||
|
||||
// list of files / patterns to exclude
|
||||
exclude: [],
|
||||
|
||||
// preprocess matching files before serving them to the browser
|
||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||
preprocessors: {
|
||||
"**/*.js": ["sourcemap", "env"],
|
||||
// IMPORTANT: COMMENT following line if you want to debug in your browsers!!
|
||||
// Preprocess source file to calculate code coverage, however this will make source file unreadable
|
||||
//"dist-test/index.browser.js": ["coverage"]
|
||||
},
|
||||
|
||||
// inject following environment values into browser testing with window.__env__
|
||||
// environment values MUST be exported or set with same console running "karma start"
|
||||
// https://www.npmjs.com/package/karma-env-preprocessor
|
||||
// EXAMPLE: envPreprocessor: ["ACCOUNT_NAME", "ACCOUNT_SAS"],
|
||||
|
||||
// test results reporter to use
|
||||
// possible values: 'dots', 'progress'
|
||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ["mocha", "coverage", "junit"],
|
||||
|
||||
coverageReporter: {
|
||||
// specify a common output directory
|
||||
dir: "coverage-browser/",
|
||||
reporters: [
|
||||
{ type: "json", subdir: ".", file: "coverage.json" },
|
||||
{ type: "lcovonly", subdir: ".", file: "lcov.info" },
|
||||
{ type: "html", subdir: "html" },
|
||||
{ type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" },
|
||||
],
|
||||
},
|
||||
|
||||
junitReporter: {
|
||||
outputDir: "", // results will be saved as $outputDir/$browserName.xml
|
||||
outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile
|
||||
suite: "", // suite will become the package name attribute in xml testsuite element
|
||||
useBrowserName: false, // add browser name to report and classes names
|
||||
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
|
||||
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
|
||||
properties: {}, // key value pair of properties to add to the <properties> section of the report
|
||||
},
|
||||
|
||||
// web server port
|
||||
port: 9876,
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors: true,
|
||||
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: false,
|
||||
|
||||
// start these browsers
|
||||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||
// 'ChromeHeadless', 'Chrome', 'Firefox', 'Edge', 'IE'
|
||||
browsers: ["ChromeHeadlessNoSandbox"],
|
||||
customLaunchers: {
|
||||
ChromeHeadlessNoSandbox: {
|
||||
base: "ChromeHeadless",
|
||||
flags: ["--no-sandbox"],
|
||||
},
|
||||
},
|
||||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: true,
|
||||
|
||||
// Concurrency level
|
||||
// how many browser should be started simultaneous
|
||||
concurrency: 1,
|
||||
|
||||
browserNoActivityTimeout: 600000,
|
||||
browserDisconnectTimeout: 10000,
|
||||
browserDisconnectTolerance: 3,
|
||||
|
||||
client: {
|
||||
mocha: {
|
||||
// change Karma's debug.html to the mocha web reporter
|
||||
reporter: "html",
|
||||
timeout: "600000",
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
"name": "@azure-rest/core-client-lro",
|
||||
"version": "1.0.0-beta.1",
|
||||
"description": "A helper library which implements Autorest x-ms-long-running-operation spec to handle long running operations.",
|
||||
"sdk-type": "core",
|
||||
"main": "dist/index.js",
|
||||
"module": "dist-esm/src/index.js",
|
||||
"types": "types/latest/core-client-lro-rest.d.ts",
|
||||
"browser": {
|
||||
"./dist-esm/test/utils/url.js": "./dist-esm/test/utils/url.browser.js"
|
||||
},
|
||||
"scripts": {
|
||||
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
|
||||
"build:samples": "echo Obsolete",
|
||||
"build:test": "tsc -p . && rollup -c 2>&1",
|
||||
"build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local",
|
||||
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
|
||||
"clean": "rimraf dist dist-* temp types *.tgz *.log",
|
||||
"docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src",
|
||||
"execute:samples": "echo skipped",
|
||||
"extract-api": "tsc -p . && api-extractor run --local",
|
||||
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
|
||||
"integration-test:browser": "echo skipped",
|
||||
"integration-test:node": "echo skipped",
|
||||
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
||||
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
|
||||
"lint": "eslint package.json api-extractor.json src test --ext .ts",
|
||||
"pack": "npm pack 2>&1",
|
||||
"prebuild": "npm run clean",
|
||||
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser && npm run integration-test:browser",
|
||||
"test:node": "npm run clean && tsc -p . && npm run unit-test:node && npm run integration-test:node",
|
||||
"test": "npm run clean && tsc -p . && npm run unit-test:node && rollup -c 2>&1 && npm run unit-test:browser && npm run integration-test",
|
||||
"unit-test:browser": "karma start --single-run",
|
||||
"unit-test:node": "mocha -r esm -r ts-node/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 1200000 --full-trace --exclude \"test/**/browser/*.spec.ts\" \"test/**/*.spec.ts\"",
|
||||
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
|
||||
},
|
||||
"files": [
|
||||
"dist/",
|
||||
"dist-esm/src/",
|
||||
"types/latest/core-client-lro-rest.d.ts",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
"repository": "github:Azure/azure-sdk-for-js",
|
||||
"keywords": [
|
||||
"azure",
|
||||
"cloud"
|
||||
],
|
||||
"author": "Microsoft Corporation",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-client-lro-rest/README.md",
|
||||
"sideEffects": false,
|
||||
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
|
||||
"dependencies": {
|
||||
"@azure/core-lro": "^2.2.0",
|
||||
"@azure-rest/core-client": "1.0.0-beta.6",
|
||||
"tslib": "^2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@azure/core-rest-pipeline": "^1.1.0",
|
||||
"@azure/dev-tool": "^1.0.0",
|
||||
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
||||
"@microsoft/api-extractor": "7.13.2",
|
||||
"@types/chai": "^4.1.6",
|
||||
"@types/mocha": "^7.0.2",
|
||||
"@types/node": "^12.0.0",
|
||||
"chai": "^4.2.0",
|
||||
"cross-env": "^7.0.2",
|
||||
"eslint": "^7.15.0",
|
||||
"inherits": "^2.0.3",
|
||||
"karma-chrome-launcher": "^3.0.0",
|
||||
"karma-coverage": "^2.0.0",
|
||||
"karma-edge-launcher": "^0.4.2",
|
||||
"karma-env-preprocessor": "^0.1.1",
|
||||
"karma-firefox-launcher": "^1.1.0",
|
||||
"karma-ie-launcher": "^1.0.0",
|
||||
"karma-junit-reporter": "^2.0.1",
|
||||
"karma-mocha-reporter": "^2.2.5",
|
||||
"karma-mocha": "^2.0.1",
|
||||
"karma-sourcemap-loader": "^0.3.8",
|
||||
"karma": "^6.2.0",
|
||||
"mocha-junit-reporter": "^1.18.0",
|
||||
"mocha": "^7.1.1",
|
||||
"prettier": "2.2.1",
|
||||
"rimraf": "^3.0.0",
|
||||
"rollup": "^1.16.3",
|
||||
"sinon": "^9.0.2",
|
||||
"typedoc": "0.15.2",
|
||||
"typescript": "~4.2.0",
|
||||
"util": "^0.12.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
## API Report File for "@azure-rest/core-client-lro"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { Client } from '@azure-rest/core-client';
|
||||
import { HttpResponse } from '@azure-rest/core-client';
|
||||
import { LroEngineOptions } from '@azure/core-lro';
|
||||
import { PollerLike } from '@azure/core-lro';
|
||||
import { PollOperationState } from '@azure/core-lro';
|
||||
|
||||
// @public
|
||||
export function getLongRunningPoller<TResult extends HttpResponse>(client: Client, initialResponse: TResult): PollerLike<PollOperationState<TResult>, TResult>;
|
||||
|
||||
// @public
|
||||
export function getLongRunningPoller<TResult extends HttpResponse>(client: Client, initialResponse: TResult, pollerOptions: LroEngineOptions<TResult, PollOperationState<TResult>>): PollerLike<PollOperationState<TResult>, TResult>;
|
||||
|
||||
export { LroEngineOptions }
|
||||
|
||||
export { PollerLike }
|
||||
|
||||
// @public
|
||||
export interface PollerOptions {
|
||||
resumeFrom?: string;
|
||||
updateIntervalInMs?: number;
|
||||
}
|
||||
|
||||
export { PollOperationState }
|
||||
|
||||
|
||||
```
|
|
@ -0,0 +1,2 @@
|
|||
import { makeConfig } from "@azure/dev-tool/shared-config/rollup";
|
||||
export default makeConfig(require("./package.json"));
|
|
@ -0,0 +1,95 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import { Client, HttpResponse } from "@azure-rest/core-client";
|
||||
import {
|
||||
LongRunningOperation,
|
||||
LroEngine,
|
||||
LroEngineOptions,
|
||||
LroResponse,
|
||||
PollOperationState,
|
||||
PollerLike,
|
||||
} from "@azure/core-lro";
|
||||
|
||||
/**
|
||||
* Options for the poller
|
||||
*/
|
||||
export interface PollerOptions {
|
||||
/**
|
||||
* Defines how much time the poller is going to wait before making a new request to the service.
|
||||
*/
|
||||
updateIntervalInMs?: number;
|
||||
/**
|
||||
* A serialized poller which can be used to resume an existing paused Long-Running-Operation.
|
||||
*/
|
||||
resumeFrom?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function that builds a Poller object to help polling a long running operation.
|
||||
* @param client - Client to use for sending the request to get additional pages.
|
||||
* @param initialResponse - The initial response.
|
||||
* @returns - A poller object to poll for operation state updates and eventually get the final response.
|
||||
*/
|
||||
export function getLongRunningPoller<TResult extends HttpResponse>(
|
||||
client: Client,
|
||||
initialResponse: TResult
|
||||
): PollerLike<PollOperationState<TResult>, TResult>;
|
||||
/**
|
||||
* Helper function that builds a Poller object to help polling a long running operation.
|
||||
* @param client - Client to use for sending the request to get additional pages.
|
||||
* @param initialResponse - The initial response.
|
||||
* @param pollerOptions - Options to set a resume state or custom polling interval.
|
||||
* @returns - A poller object to poll for operation state updates and eventually get the final response.
|
||||
*/
|
||||
export function getLongRunningPoller<TResult extends HttpResponse>(
|
||||
client: Client,
|
||||
initialResponse: TResult,
|
||||
pollerOptions: LroEngineOptions<TResult, PollOperationState<TResult>>
|
||||
): PollerLike<PollOperationState<TResult>, TResult>;
|
||||
export function getLongRunningPoller<TResult extends HttpResponse>(
|
||||
client: Client,
|
||||
initialResponse: TResult,
|
||||
pollerOptions?: LroEngineOptions<TResult, PollOperationState<TResult>>
|
||||
): PollerLike<PollOperationState<TResult>, TResult> {
|
||||
const poller: LongRunningOperation<TResult> = {
|
||||
requestMethod: initialResponse.request.method,
|
||||
requestPath: initialResponse.request.url,
|
||||
sendInitialRequest: async () => {
|
||||
// In the case of Rest Clients we are building the LRO poller object from a response that's the reason
|
||||
// we are not triggering the initial request here, just extracting the information from the
|
||||
// response we were provided.
|
||||
return getLroResponse(initialResponse);
|
||||
},
|
||||
sendPollRequest: async (path) => {
|
||||
// This is the callback that is going to be called to poll the service
|
||||
// to get the latest status. We use the client provided and the polling path
|
||||
// which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
|
||||
// depending on the lro pattern that the service implements. If non is provided we default to the initial path.
|
||||
const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();
|
||||
return getLroResponse(response as TResult);
|
||||
},
|
||||
};
|
||||
|
||||
return new LroEngine(poller, pollerOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a Rest Client response to a response that the LRO engine knows about
|
||||
* @param response - a rest client http response
|
||||
* @returns - An LRO response that the LRO engine can work with
|
||||
*/
|
||||
function getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {
|
||||
if (Number.isNaN(response.status)) {
|
||||
throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
|
||||
}
|
||||
|
||||
return {
|
||||
flatResponse: response,
|
||||
rawResponse: {
|
||||
...response,
|
||||
statusCode: Number.parseInt(response.status),
|
||||
body: response.body,
|
||||
},
|
||||
};
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
/**
|
||||
* A helper library which implements Autorest x-ms-long-running-operation spec for long-running operations
|
||||
*
|
||||
* @packageDocumentation
|
||||
*/
|
||||
export { getLongRunningPoller, PollerOptions } from "./getLongRunningHelper";
|
||||
export { PollerLike, PollOperationState, LroEngineOptions } from "@azure/core-lro";
|
|
@ -0,0 +1,294 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
import { assert } from "chai";
|
||||
import { Client, getClient } from "@azure-rest/core-client";
|
||||
import { getLongRunningPoller } from "../src/getLongRunningHelper";
|
||||
import {
|
||||
PipelineResponse,
|
||||
createHttpHeaders,
|
||||
HttpHeaders,
|
||||
HttpMethods,
|
||||
} from "@azure/core-rest-pipeline";
|
||||
import { URL } from "./utils/url";
|
||||
|
||||
describe("LRO helper", () => {
|
||||
let client: Client;
|
||||
|
||||
beforeEach(() => {
|
||||
client = getClient("http://localhost:3000", { allowInsecureConnection: true });
|
||||
client.pipeline.getOrderedPolicies().forEach(({ name }) => {
|
||||
client.pipeline.removePolicy({ name });
|
||||
});
|
||||
});
|
||||
|
||||
it("LROs_put200Succeeded", async () => {
|
||||
// Long running put request, service returns a 200 to the initial request, with an entity that contains ProvisioningState=’Succeeded’.
|
||||
const expectedBody = { properties: { provisioningState: "Succeeded" }, id: "100", name: "foo" };
|
||||
mockResponse(client, [
|
||||
{
|
||||
path: "/lro/put/200/succeeded",
|
||||
method: "PUT",
|
||||
response: { status: 200, body: expectedBody },
|
||||
},
|
||||
]);
|
||||
const initialResponse = await client.pathUnchecked("/lro/put/200/succeeded").put();
|
||||
const poller = getLongRunningPoller(client, initialResponse);
|
||||
const result = await poller.pollUntilDone();
|
||||
|
||||
assert.equal(result.status, "200");
|
||||
assert.deepEqual(result.body, expectedBody);
|
||||
});
|
||||
|
||||
it("LROs_put201Succeeded", async () => {
|
||||
// Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Succeeded’.
|
||||
const expectedBody = { properties: { provisioningState: "Succeeded" }, id: "100", name: "foo" };
|
||||
mockResponse(client, [
|
||||
{
|
||||
path: "/lro/put/201/succeeded",
|
||||
method: "PUT",
|
||||
response: { status: 201, body: expectedBody },
|
||||
},
|
||||
]);
|
||||
const initialResponse = await client.pathUnchecked("/lro/put/201/succeeded").put();
|
||||
const poller = getLongRunningPoller(client, initialResponse);
|
||||
const result = await poller.pollUntilDone();
|
||||
|
||||
assert.equal(result.status, "201");
|
||||
assert.deepEqual(result.body, expectedBody);
|
||||
});
|
||||
|
||||
it("LROs_post202List", async () => {
|
||||
// Long running put request, service returns a 202 with empty body to first request, returns a 200 with body [{ 'id': '100', 'name': 'foo' }].
|
||||
const expectedBody = [{ id: "100", name: "foo" }];
|
||||
mockResponse(client, [
|
||||
{
|
||||
path: "/lro/list",
|
||||
method: "POST",
|
||||
response: {
|
||||
status: 202,
|
||||
headers: createHttpHeaders({
|
||||
// Set the location for polling
|
||||
"azure-asyncoperation": "http://localhost:3000/lro/list/pollingGet",
|
||||
// Set location for getting the result once polling finished
|
||||
location: "http://localhost:3000/lro/list/finalGet",
|
||||
}),
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/lro/list/pollingGet",
|
||||
method: "GET",
|
||||
response: { status: 200, body: { status: "Succeeded" } },
|
||||
},
|
||||
{ path: "/lro/list/finalGet", method: "GET", response: { status: 200, body: expectedBody } },
|
||||
]);
|
||||
const initialResponse = await client.pathUnchecked("/lro/list").post();
|
||||
const poller = getLongRunningPoller(client, initialResponse, { intervalInMs: 1 });
|
||||
const result = await poller.pollUntilDone();
|
||||
|
||||
assert.equal(result.status, "200");
|
||||
assert.deepEqual(result.body, expectedBody);
|
||||
});
|
||||
|
||||
it("LROs_put200SucceededNoState", async () => {
|
||||
// Long running put request, service returns a 200 to the initial request, with an entity that does not contain ProvisioningState=’Succeeded’.
|
||||
const expectedBody = { id: "100", name: "foo" };
|
||||
mockResponse(client, [
|
||||
{
|
||||
path: "/lro/put/200/succeeded/nostate",
|
||||
method: "PUT",
|
||||
response: { status: 200, body: expectedBody },
|
||||
},
|
||||
]);
|
||||
const initialResponse = await client.pathUnchecked("/lro/put/200/succeeded/nostate").put();
|
||||
const poller = getLongRunningPoller(client, initialResponse);
|
||||
const result = await poller.pollUntilDone();
|
||||
|
||||
assert.equal(result.status, "200");
|
||||
assert.deepEqual(result.body, expectedBody);
|
||||
});
|
||||
|
||||
it("LROs_put200UpdatingSucceeded200", async () => {
|
||||
// Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Updating’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Succeeded’
|
||||
const expectedBody = { properties: { provisioningState: "Succeeded" }, id: "100", name: "foo" };
|
||||
mockResponse(client, [
|
||||
{
|
||||
path: "/lro/put/200/updating/succeeded/200",
|
||||
method: "PUT",
|
||||
response: {
|
||||
status: 200,
|
||||
body: { properties: { provisioningState: "Updating" }, id: "100", name: "foo" },
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/lro/put/200/updating/succeeded/200",
|
||||
method: "GET",
|
||||
response: { status: 200, body: expectedBody },
|
||||
},
|
||||
]);
|
||||
const initialResponse = await client.pathUnchecked("/lro/put/200/updating/succeeded/200").put();
|
||||
const poller = getLongRunningPoller(client, initialResponse, { intervalInMs: 1 });
|
||||
const result = await poller.pollUntilDone();
|
||||
|
||||
assert.equal(result.status, "200");
|
||||
assert.deepEqual(result.body, expectedBody);
|
||||
});
|
||||
|
||||
it("LROs_put201CreatingFailed200", async () => {
|
||||
// Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Created’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Failed’ const expectedBody = { "properties": { "provisioningState": "Succeeded"}, "id": "100", "name": "foo" }
|
||||
const expectedBody = { properties: { provisioningState: "Failed" }, id: "100", name: "foo" };
|
||||
|
||||
mockResponse(client, [
|
||||
{
|
||||
path: "/lro/put/201/created/failed/200",
|
||||
method: "PUT",
|
||||
response: {
|
||||
status: 201,
|
||||
body: { properties: { provisioningState: "Created" }, id: "100", name: "foo" },
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/lro/put/201/created/failed/200",
|
||||
method: "GET",
|
||||
response: { status: 200, body: expectedBody },
|
||||
},
|
||||
]);
|
||||
const initialResponse = await client.pathUnchecked("/lro/put/201/created/failed/200").put();
|
||||
const poller = getLongRunningPoller(client, initialResponse, { intervalInMs: 1 });
|
||||
try {
|
||||
await poller.pollUntilDone();
|
||||
assert.fail("Expected exception");
|
||||
} catch (error) {
|
||||
assert.equal(
|
||||
error.message,
|
||||
"The long running operation has failed. The provisioning state: failed."
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it("LROs_put200Acceptedcanceled200", async () => {
|
||||
// Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Created’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Failed’ const expectedBody = { "properties": { "provisioningState": "Succeeded"}, "id": "100", "name": "foo" }
|
||||
const expectedBody = { properties: { provisioningState: "canceled" }, id: "100", name: "foo" };
|
||||
|
||||
mockResponse(client, [
|
||||
{
|
||||
path: "/lro/put/200/accepted/canceled/200",
|
||||
method: "PUT",
|
||||
response: {
|
||||
status: 200,
|
||||
body: { properties: { provisioningState: "Accepted" }, id: "100", name: "foo" },
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "/lro/put/200/accepted/canceled/200",
|
||||
method: "GET",
|
||||
response: { status: 200, body: expectedBody },
|
||||
},
|
||||
]);
|
||||
const initialResponse = await client.pathUnchecked("/lro/put/200/accepted/canceled/200").put();
|
||||
const poller = getLongRunningPoller(client, initialResponse, { intervalInMs: 1 });
|
||||
try {
|
||||
await poller.pollUntilDone();
|
||||
assert.fail("Expected exception");
|
||||
} catch (error) {
|
||||
assert.equal(
|
||||
error.message,
|
||||
"The long running operation has failed. The provisioning state: canceled."
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it("LROPutNoHeaderInRetry", async () => {
|
||||
// Long running put request, service returns a 201 to the initial request, with an entity that contains ProvisioningState=’Created’. Polls return this value until the last poll returns a ‘200’ with ProvisioningState=’Failed’ const expectedBody = { "properties": { "provisioningState": "Succeeded"}, "id": "100", "name": "foo" }
|
||||
const expectedBody = { properties: { provisioningState: "Succeeded" }, id: "100", name: "foo" };
|
||||
|
||||
mockResponse(client, [
|
||||
{
|
||||
path: "/lro/put/noheader/202/200",
|
||||
method: "PUT",
|
||||
response: {
|
||||
status: 200,
|
||||
body: { properties: { provisioningState: "Accepted" }, id: "100", name: "foo" },
|
||||
headers: createHttpHeaders({
|
||||
location: "http://localhost:3000/lro/put/noheader/operationresults",
|
||||
}),
|
||||
},
|
||||
},
|
||||
{ path: "/lro/put/noheader/operationresults", method: "GET", response: { status: 202 } },
|
||||
{
|
||||
path: "/lro/put/noheader/operationresults",
|
||||
method: "GET",
|
||||
response: { status: 200, body: expectedBody },
|
||||
},
|
||||
]);
|
||||
const initialResponse = await client.pathUnchecked("/lro/put/noheader/202/200").put();
|
||||
const poller = getLongRunningPoller(client, initialResponse, { intervalInMs: 1 });
|
||||
const result = await poller.pollUntilDone();
|
||||
|
||||
assert.equal(result.status, "200");
|
||||
assert.deepEqual(result.body, expectedBody);
|
||||
});
|
||||
});
|
||||
|
||||
interface MockResponse {
|
||||
path: string;
|
||||
method: HttpMethods;
|
||||
response: {
|
||||
status: number;
|
||||
body?: any;
|
||||
headers?: HttpHeaders;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a pipeline with a mocked service call
|
||||
* @param client - client to mock requests for
|
||||
* @param response - Responses to return, the actual request url is matched to one of the paths in the responses and the defined object is returned.
|
||||
* if no path matches a 404 error is returned
|
||||
*/
|
||||
function mockResponse(client: Client, responses: MockResponse[]) {
|
||||
let count = 0;
|
||||
|
||||
client.pipeline.addPolicy({
|
||||
name: "mockClient",
|
||||
sendRequest: async (request, _next): Promise<PipelineResponse> => {
|
||||
if (count < responses.length) {
|
||||
count++;
|
||||
}
|
||||
|
||||
const path = new URL(request.url).pathname;
|
||||
let responseIndex = -1;
|
||||
|
||||
const response = responses.find((r, index) => {
|
||||
const match =
|
||||
r.path === path && r.method.toLocaleLowerCase() === request.method.toLocaleLowerCase();
|
||||
|
||||
if (match) {
|
||||
responseIndex = index;
|
||||
}
|
||||
|
||||
return match;
|
||||
});
|
||||
|
||||
if (!response) {
|
||||
console.warn(`Didn't find a match for path ${path} and method: ${request.method}`);
|
||||
return {
|
||||
headers: createHttpHeaders(),
|
||||
request,
|
||||
status: 404,
|
||||
};
|
||||
}
|
||||
|
||||
const { body, status } = response.response;
|
||||
const bodyAsText = JSON.stringify(body);
|
||||
// remove the matched response from the list to avoid matching it again
|
||||
responses.splice(responseIndex, 1);
|
||||
return {
|
||||
headers: response.response.headers ?? createHttpHeaders(),
|
||||
request,
|
||||
status,
|
||||
bodyAsText,
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
/// <reference lib="dom" />
|
||||
|
||||
const url = URL;
|
||||
const urlSearchParams = URLSearchParams;
|
||||
|
||||
export { url as URL, urlSearchParams as URLSearchParams };
|
|
@ -0,0 +1,4 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
export { URL, URLSearchParams } from "url";
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"extends": "../../../tsconfig.package",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist-esm",
|
||||
"declarationDir": "./types/latest"
|
||||
},
|
||||
"include": ["src/**/*.ts", "test/**/*.ts"]
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
|
||||
"extends": ["../../../tsdoc.json"]
|
||||
}
|
|
@ -37,7 +37,7 @@
|
|||
"files": [
|
||||
"dist/",
|
||||
"dist-esm/src/",
|
||||
"types/src/latest/core-client-paging-rest.d.ts",
|
||||
"types/latest/core-client-paging-rest.d.ts",
|
||||
"README.md",
|
||||
"LICENSE"
|
||||
],
|
||||
|
|
Загрузка…
Ссылка в новой задаче