From 80a319443154af6ff70b94bc752e99f7ddd9c046 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Fri, 26 Jun 2020 14:31:27 -0700 Subject: [PATCH 1/5] [FormRecognizer] Enable copy model test and adding recordings --- .../recording_copies_model.js | 175 ++++++++++++++++++ .../test/node/formtrainingclient.spec.ts | 3 +- .../test/util/recordedClients.ts | 11 +- 3 files changed, 183 insertions(+), 6 deletions(-) create mode 100644 sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js new file mode 100644 index 000000000000..c5947e30e926 --- /dev/null +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js @@ -0,0 +1,175 @@ +let nock = require('nock'); + +module.exports.hash = "a4d1af0f0e467a862bd88a6c2ae35d93"; + +module.exports.testInfo = {"uniqueName":{},"newDate":{}} + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post('/formrecognizer/v2.0-preview/custom/models/copyAuthorization') + .reply(201, {"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2","accessToken":"accessToken","expirationDateTimeTicks":1593293052}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'Location', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/be7f15e3-1b1e-43da-a133-d2869763f3c2', + 'x-envoy-upstream-service-time', + '502', + 'apim-request-id', + 'aa0b36eb-b20d-4afb-ae48-cc01a872d827', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:11 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .post('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copy', {"targetResourceId":"/subscriptions/e1367d46-77d4-4f57-8cfe-348edbdc84a3/resourceGroups/jstests/providers/Microsoft.CognitiveServices/accounts/jstests-fr","targetResourceRegion":"westus2","copyAuthorization":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2","accessToken":"accessToken","expirationDateTimeTicks":1593293052}}) + .reply(202, "", [ + 'Content-Length', + '0', + 'Operation-Location', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyresults/eefd4da6-4503-4542-99bb-eee373b53f7e', + 'x-envoy-upstream-service-time', + '5085', + 'apim-request-id', + '5403624a-676c-4b32-9642-275b03542946', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:17 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '17', + 'apim-request-id', + 'b06eec3e-69f4-4da3-847c-2e2be31ef887', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:17 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '19', + 'apim-request-id', + 'df40c290-1d3a-4d13-9dc0-0638d5f48a8a', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:17 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '18', + 'apim-request-id', + '74138daa-151e-4ff9-8395-a43258b7ba26', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:23 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '92', + 'apim-request-id', + '75db5e0d-8c39-4596-9df5-5cd556270f04', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:27 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '15', + 'apim-request-id', + '9ae58ed9-e980-43a5-8153-aa1fd0b41794', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:32 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"succeeded","createdDateTime":"2020-06-26T21:24:36.5192716Z","lastUpdatedDateTime":"2020-06-26T21:24:36.5192718Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '28', + 'apim-request-id', + '0f65dce7-4331-42cf-9427-9f2050ee9871', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:37 GMT', + 'Connection', + 'close' +]); diff --git a/sdk/formrecognizer/ai-form-recognizer/test/node/formtrainingclient.spec.ts b/sdk/formrecognizer/ai-form-recognizer/test/node/formtrainingclient.spec.ts index 9bffa96622bb..3a34983cebb4 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/node/formtrainingclient.spec.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/node/formtrainingclient.spec.ts @@ -195,8 +195,7 @@ describe("FormTrainingClient NodeJS only", () => { } }); - // TODO: re-enabling is tracked by https://github.com/azure/azure-sdk-for-js/issues/9072 - it.skip("copies model", async function() { + it("copies model", async function() { // for testing purpose, copy into the same resource const resourceId = env.FORM_RECOGNIZER_TARGET_RESOURCE_ID; const resourceRegion = env.FORM_RECOGNIZER_TARGET_RESOURCE_REGION; diff --git a/sdk/formrecognizer/ai-form-recognizer/test/util/recordedClients.ts b/sdk/formrecognizer/ai-form-recognizer/test/util/recordedClients.ts index 4917ddd2de62..54325c3a270c 100644 --- a/sdk/formrecognizer/ai-form-recognizer/test/util/recordedClients.ts +++ b/sdk/formrecognizer/ai-form-recognizer/test/util/recordedClients.ts @@ -32,8 +32,9 @@ const replaceableVariables: { [k: string]: string } = { FORM_RECOGNIZER_ENDPOINT: "https://endpoint/", FORM_RECOGNIZER_TRAINING_CONTAINER_SAS_URL: "https://storageaccount/trainingdata?sastoken", FORM_RECOGNIZER_TESTING_CONTAINER_SAS_URL: "https://storageaccount/testingdata?sastoken", - FORM_RECOGNIZER_TARGET_RESOURCE_REGION: "resource_region", - FORM_RECOGNIZER_TARGET_RESOURCE_ID: "resource_id" + FORM_RECOGNIZER_TARGET_RESOURCE_REGION: "westus2", + // fake resource id + FORM_RECOGNIZER_TARGET_RESOURCE_ID: "/subscriptions/e1367d46-77d4-4f57-8cfe-348edbdc84a3/resourceGroups/jstests/providers/Microsoft.CognitiveServices/accounts/jstests-fr" }; export const testEnv = new Proxy(replaceableVariables, { @@ -46,8 +47,10 @@ export const environmentSetup: RecorderEnvironmentSetup = { replaceableVariables, customizationsOnRecordings: [ (recording: string): string => - recording.replace(/"access_token"\s?:\s?"[^"]*"/g, `"access_token":"access_token"`), - // If we put ENDPOINT in replaceableVariables above, it will not capture + recording.replace(/"access_token"\s?:\s?"[^"]*"/g, `"access_token":"access_token"`) + .replace(/"accessToken"\s?:\s?"[^"]*"/g, `"accessToken":"accessToken"`) + .replace(/"targetResourceId"\s?:\s?"[^"]*"/g, `"targetResourceId":"${replaceableVariables["FORM_RECOGNIZER_TARGET_RESOURCE_ID"]}"`), + // If we put ENDPOINT in replaceableVariables above, it will not capture // the endpoint string used with nock, which will be expanded to // https://:443/ and therefore will not match, so we have to do // this instead. From 669c0e44f27edd6d8a34547db9e126b6cf37717e Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Fri, 26 Jun 2020 14:40:39 -0700 Subject: [PATCH 2/5] Remove some creating polling state from recording to shorten playback test run duration. --- .../recording_copies_model.js | 84 ------------------- ...ding_trains_model_with_forms_and_labels.js | 76 +++++------------ ...g_trains_model_with_forms_and_no_labels.js | 76 +++++------------ ...rms_and_no_labels_including_sub_folders.js | 76 +++++------------ ..._forms_and_no_labels_specifying_prefix_.js | 68 +++++++-------- 5 files changed, 91 insertions(+), 289 deletions(-) diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js index c5947e30e926..6451f5bf7a1d 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js @@ -48,90 +48,6 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'close' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') - .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '17', - 'apim-request-id', - 'b06eec3e-69f4-4da3-847c-2e2be31ef887', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Fri, 26 Jun 2020 21:24:17 GMT', - 'Connection', - 'close' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') - .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '19', - 'apim-request-id', - 'df40c290-1d3a-4d13-9dc0-0638d5f48a8a', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Fri, 26 Jun 2020 21:24:17 GMT', - 'Connection', - 'close' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') - .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '18', - 'apim-request-id', - '74138daa-151e-4ff9-8395-a43258b7ba26', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Fri, 26 Jun 2020 21:24:23 GMT', - 'Connection', - 'close' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') - .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '92', - 'apim-request-id', - '75db5e0d-8c39-4596-9df5-5cd556270f04', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Fri, 26 Jun 2020 21:24:27 GMT', - 'Connection', - 'close' -]); - nock('https://endpoint:443', {"encodedQueryParams":true}) .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js index 43996d8a68dc..ada580fccafd 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "5a98b0b4f208c33690bb9023a8a45c33"; +module.exports.hash = "cad1a0d190f552be0293f81c20b80044"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -10,95 +10,61 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Content-Length', '0', 'Location', - 'https://endpoint/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb', 'x-envoy-upstream-service-time', - '43', + '5093', 'apim-request-id', - '34098037-97a2-406f-a674-f56b31b7f1db', + '866a1217-6c0b-491f-bbbe-f5b666017852', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:04 GMT' + 'Fri, 26 Jun 2020 21:23:26 GMT', + 'Connection', + 'close' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb') .query(true) - .reply(200, {"modelInfo":{"modelId":"7f954280-8212-4c61-9c33-8fea2e47d279","status":"creating","createdDateTime":"2020-05-02T20:00:04Z","lastUpdatedDateTime":"2020-05-02T20:00:04Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"8868c5b9-2248-4650-b906-a30bd14196bb","status":"creating","createdDateTime":"2020-06-26T21:23:22Z","lastUpdatedDateTime":"2020-06-26T21:23:22Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '31', + '23', 'apim-request-id', - '5e601f0c-7b99-4928-8cd8-46863156553d', + '2b4f9d53-b8c9-4aab-a13c-e4e1f28bbe0a', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:04 GMT' + 'Fri, 26 Jun 2020 21:23:32 GMT', + 'Connection', + 'close' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb') .query(true) - .reply(200, {"modelInfo":{"modelId":"7f954280-8212-4c61-9c33-8fea2e47d279","status":"creating","createdDateTime":"2020-05-02T20:00:04Z","lastUpdatedDateTime":"2020-05-02T20:00:04Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"8868c5b9-2248-4650-b906-a30bd14196bb","status":"ready","createdDateTime":"2020-06-26T21:23:22Z","lastUpdatedDateTime":"2020-06-26T21:23:36Z"},"trainResult":{"averageModelAccuracy":0.973,"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"status":"succeeded"}],"fields":[{"fieldName":"CompanyAddress","accuracy":0.8},{"fieldName":"CompanyName","accuracy":1},{"fieldName":"CompanyPhoneNumber","accuracy":1},{"fieldName":"DatedAs","accuracy":1},{"fieldName":"Email","accuracy":0.8},{"fieldName":"Merchant","accuracy":1},{"fieldName":"PhoneNumber","accuracy":1},{"fieldName":"PurchaseOrderNumber","accuracy":1},{"fieldName":"Quantity","accuracy":1},{"fieldName":"Signature","accuracy":1},{"fieldName":"Subtotal","accuracy":1},{"fieldName":"Tax","accuracy":1},{"fieldName":"Total","accuracy":1},{"fieldName":"VendorName","accuracy":1},{"fieldName":"Website","accuracy":1}],"errors":[]}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '48', + '18', 'apim-request-id', - 'b139f1d7-3a2e-43ef-ae74-396dea5c1388', + 'b5892068-1533-4b07-911f-0dc9abdb9429', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:04 GMT' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') - .query(true) - .reply(200, {"modelInfo":{"modelId":"7f954280-8212-4c61-9c33-8fea2e47d279","status":"creating","createdDateTime":"2020-05-02T20:00:04Z","lastUpdatedDateTime":"2020-05-02T20:00:04Z"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '27', - 'apim-request-id', - '370aac86-e5a3-4069-ad0b-6726f0e905af', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 20:00:09 GMT' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') - .query(true) - .reply(200, {"modelInfo":{"modelId":"7f954280-8212-4c61-9c33-8fea2e47d279","status":"ready","createdDateTime":"2020-05-02T20:00:04Z","lastUpdatedDateTime":"2020-05-02T20:00:12Z"},"trainResult":{"averageModelAccuracy":0.973,"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"status":"succeeded"}],"fields":[{"fieldName":"CompanyAddress","accuracy":0.8},{"fieldName":"CompanyName","accuracy":1},{"fieldName":"CompanyPhoneNumber","accuracy":1},{"fieldName":"DatedAs","accuracy":1},{"fieldName":"Email","accuracy":0.8},{"fieldName":"Merchant","accuracy":1},{"fieldName":"PhoneNumber","accuracy":1},{"fieldName":"PurchaseOrderNumber","accuracy":1},{"fieldName":"Quantity","accuracy":1},{"fieldName":"Signature","accuracy":1},{"fieldName":"Subtotal","accuracy":1},{"fieldName":"Tax","accuracy":1},{"fieldName":"Total","accuracy":1},{"fieldName":"VendorName","accuracy":1},{"fieldName":"Website","accuracy":1}],"errors":[]}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '29', - 'apim-request-id', - '2c23e3c3-4c7b-4304-b058-1b26feba5c61', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 20:00:15 GMT' + 'Fri, 26 Jun 2020 21:23:37 GMT', + 'Connection', + 'close' ]); diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js index 3beb90b681b2..93ce47748f4c 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "bb482db3fb10d0ee44e322df4f19ed76"; +module.exports.hash = "c8c4a8dfbb5b81bc885b80a28093ea14"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -10,95 +10,61 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Content-Length', '0', 'Location', - 'https://endpoint/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/97ffff4a-c78c-48e5-8a60-5644bf3f3bf0', 'x-envoy-upstream-service-time', - '49', + '514', 'apim-request-id', - 'bc1f9d21-38e8-4db7-b38c-43615e93ffe2', + '510d9a9c-b393-4fc8-b84d-ef01a6c3fd2c', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 19:59:54 GMT' + 'Fri, 26 Jun 2020 21:23:09 GMT', + 'Connection', + 'close' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') + .get('/formrecognizer/v2.0-preview/custom/models/97ffff4a-c78c-48e5-8a60-5644bf3f3bf0') .query(true) - .reply(200, {"modelInfo":{"modelId":"80d87355-5d05-40b3-9dc3-1a7c384ff710","status":"creating","createdDateTime":"2020-05-02T19:59:54Z","lastUpdatedDateTime":"2020-05-02T19:59:54Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"97ffff4a-c78c-48e5-8a60-5644bf3f3bf0","status":"creating","createdDateTime":"2020-06-26T21:23:09Z","lastUpdatedDateTime":"2020-06-26T21:23:09Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '35', + '17', 'apim-request-id', - 'c20e75f8-57bb-4fd5-8e30-4aa68a56512c', + '9bf5ccc6-81fb-4bbf-96b1-c190e8728829', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 19:59:54 GMT' + 'Fri, 26 Jun 2020 21:23:15 GMT', + 'Connection', + 'close' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') + .get('/formrecognizer/v2.0-preview/custom/models/97ffff4a-c78c-48e5-8a60-5644bf3f3bf0') .query(true) - .reply(200, {"modelInfo":{"modelId":"80d87355-5d05-40b3-9dc3-1a7c384ff710","status":"creating","createdDateTime":"2020-05-02T19:59:54Z","lastUpdatedDateTime":"2020-05-02T19:59:54Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"97ffff4a-c78c-48e5-8a60-5644bf3f3bf0","status":"ready","createdDateTime":"2020-06-26T21:23:09Z","lastUpdatedDateTime":"2020-06-26T21:23:20Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Company Name:","Company Phone:","Dated As:","Details","Email:","Hero Limited","Name:","Phone:","Purchase Order","Purchase Order #:","Quantity","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Total","Unit Price","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '31', + '22', 'apim-request-id', - '4622e343-6e8d-4ea9-8f86-2e009079d9fc', + '9366caf5-2149-4259-9a44-a61f5aa01d34', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 19:59:54 GMT' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') - .query(true) - .reply(200, {"modelInfo":{"modelId":"80d87355-5d05-40b3-9dc3-1a7c384ff710","status":"creating","createdDateTime":"2020-05-02T19:59:54Z","lastUpdatedDateTime":"2020-05-02T19:59:54Z"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '26', - 'apim-request-id', - 'b9febf6c-4c1f-482c-ad6c-ba416f9b2201', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 19:59:58 GMT' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') - .query(true) - .reply(200, {"modelInfo":{"modelId":"80d87355-5d05-40b3-9dc3-1a7c384ff710","status":"ready","createdDateTime":"2020-05-02T19:59:54Z","lastUpdatedDateTime":"2020-05-02T20:00:02Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Address:","Company Name:","Company Phone:","Dated As:","Email:","Hero Limited","Name:","Phone:","Phone:","Purchase Order","Purchase Order","Purchase Order #:","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '25', - 'apim-request-id', - '459fecc5-4dd2-479f-a736-d895d339aff1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 20:00:04 GMT' + 'Fri, 26 Jun 2020 21:23:21 GMT', + 'Connection', + 'close' ]); diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js index ffaa412fb287..fc83175ae6e6 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "60455a0a4014aea1a6797571858e33c5"; +module.exports.hash = "58fbaa91b6fba6809a20a30c720cc589"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -10,95 +10,61 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Content-Length', '0', 'Location', - 'https://endpoint/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/f2e54f61-06a6-4159-a378-5a6ee061dbd6', 'x-envoy-upstream-service-time', - '42', + '529', 'apim-request-id', - 'bdcc413f-5fe6-46e7-a30f-1fcf0aaf9809', + '814c032a-79f1-42e6-8674-2153a113a2b7', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:15 GMT' + 'Fri, 26 Jun 2020 21:23:37 GMT', + 'Connection', + 'close' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') + .get('/formrecognizer/v2.0-preview/custom/models/f2e54f61-06a6-4159-a378-5a6ee061dbd6') .query(true) - .reply(200, {"modelInfo":{"modelId":"9fc504f6-293c-4c40-a581-e41ae22b40e5","status":"creating","createdDateTime":"2020-05-02T20:00:15Z","lastUpdatedDateTime":"2020-05-02T20:00:15Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"f2e54f61-06a6-4159-a378-5a6ee061dbd6","status":"creating","createdDateTime":"2020-06-26T21:23:38Z","lastUpdatedDateTime":"2020-06-26T21:23:38Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '24', + '34', 'apim-request-id', - 'f31df9fc-7803-41d5-b16f-6e6f2b47df0b', + 'c59de33f-71f4-46c5-89f6-1660f33d8501', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:15 GMT' + 'Fri, 26 Jun 2020 21:23:43 GMT', + 'Connection', + 'close' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') + .get('/formrecognizer/v2.0-preview/custom/models/f2e54f61-06a6-4159-a378-5a6ee061dbd6') .query(true) - .reply(200, {"modelInfo":{"modelId":"9fc504f6-293c-4c40-a581-e41ae22b40e5","status":"creating","createdDateTime":"2020-05-02T20:00:15Z","lastUpdatedDateTime":"2020-05-02T20:00:15Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"f2e54f61-06a6-4159-a378-5a6ee061dbd6","status":"ready","createdDateTime":"2020-06-26T21:23:38Z","lastUpdatedDateTime":"2020-06-26T21:23:47Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Company Name:","Company Phone:","Dated As:","Details","Email:","Hero Limited","Name:","Phone:","Purchase Order","Purchase Order #:","Quantity","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Total","Unit Price","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"subfolder/Form_6.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '30', + '16', 'apim-request-id', - 'b5a3d8be-3b9c-4c98-9bdd-b121f9639185', + '46d2c27c-954e-4cdf-b014-2e963e640e63', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:15 GMT' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') - .query(true) - .reply(200, {"modelInfo":{"modelId":"9fc504f6-293c-4c40-a581-e41ae22b40e5","status":"creating","createdDateTime":"2020-05-02T20:00:15Z","lastUpdatedDateTime":"2020-05-02T20:00:15Z"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '55', - 'apim-request-id', - '26b71488-cd5e-44de-847b-fb3c17f3cce4', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 20:00:20 GMT' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') - .query(true) - .reply(200, {"modelInfo":{"modelId":"9fc504f6-293c-4c40-a581-e41ae22b40e5","status":"ready","createdDateTime":"2020-05-02T20:00:15Z","lastUpdatedDateTime":"2020-05-02T20:00:24Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Address:","Company Name:","Company Phone:","Dated As:","Email:","Hero Limited","Name:","Phone:","Phone:","Purchase Order","Purchase Order","Purchase Order #:","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"subfolder/Form_6.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '30', - 'apim-request-id', - 'd1a50997-ef3a-4a07-8e53-491354d20686', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 20:00:25 GMT' + 'Fri, 26 Jun 2020 21:23:48 GMT', + 'Connection', + 'close' ]); diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js index 911b9dff0ea2..1f44813b9583 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "059836df5122d8879ba53355614de9b6"; +module.exports.hash = "4064d861ee46e22e616bc19919f56523"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -10,95 +10,83 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Content-Length', '0', 'Location', - 'https://endpoint/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/11748e70-c006-45f8-8681-772c1cecbafb', 'x-envoy-upstream-service-time', - '44', + '605', 'apim-request-id', - 'f6a8585b-87e8-4f0b-94ce-1f1cfe919465', + '91821134-2d57-4206-ad08-ee11688f56c4', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:25 GMT' + 'Fri, 26 Jun 2020 21:23:48 GMT', + 'Connection', + 'close' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') + .get('/formrecognizer/v2.0-preview/custom/models/11748e70-c006-45f8-8681-772c1cecbafb') .query(true) - .reply(200, {"modelInfo":{"modelId":"5b08cfcc-850f-42c0-97e5-a297ea26a5b3","status":"creating","createdDateTime":"2020-05-02T20:00:25Z","lastUpdatedDateTime":"2020-05-02T20:00:25Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"11748e70-c006-45f8-8681-772c1cecbafb","status":"creating","createdDateTime":"2020-06-26T21:23:49Z","lastUpdatedDateTime":"2020-06-26T21:23:49Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '29', + '27', 'apim-request-id', - 'bc4870f5-9479-46e5-9400-9a1c43d5cb77', + 'f4ddc3ee-535b-4c4f-9b53-89ccae917582', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:25 GMT' + 'Fri, 26 Jun 2020 21:23:49 GMT', + 'Connection', + 'close' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') + .get('/formrecognizer/v2.0-preview/custom/models/11748e70-c006-45f8-8681-772c1cecbafb') .query(true) - .reply(200, {"modelInfo":{"modelId":"5b08cfcc-850f-42c0-97e5-a297ea26a5b3","status":"creating","createdDateTime":"2020-05-02T20:00:25Z","lastUpdatedDateTime":"2020-05-02T20:00:25Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"11748e70-c006-45f8-8681-772c1cecbafb","status":"creating","createdDateTime":"2020-06-26T21:23:49Z","lastUpdatedDateTime":"2020-06-26T21:23:49Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '31', + '19', 'apim-request-id', - '22ae0a99-ef96-4b17-86e7-b78c05969cdf', + '685da4df-08d7-48e0-bbe3-b60b5f67e040', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:25 GMT' + 'Fri, 26 Jun 2020 21:23:59 GMT', + 'Connection', + 'close' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') + .get('/formrecognizer/v2.0-preview/custom/models/11748e70-c006-45f8-8681-772c1cecbafb') .query(true) - .reply(200, {"modelInfo":{"modelId":"5b08cfcc-850f-42c0-97e5-a297ea26a5b3","status":"creating","createdDateTime":"2020-05-02T20:00:25Z","lastUpdatedDateTime":"2020-05-02T20:00:25Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"11748e70-c006-45f8-8681-772c1cecbafb","status":"ready","createdDateTime":"2020-06-26T21:23:49Z","lastUpdatedDateTime":"2020-06-26T21:24:00Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Company Name:","Company Phone:","Dated As:","Details","Email:","Hero Limited","Name:","Phone:","Purchase Order","Purchase Order #:","Quantity","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Total","Unit Price","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '24', + '5055', 'apim-request-id', - '30b136d2-7480-47c8-bde6-8ea1212b9357', + '76214559-088b-43b1-a015-5a71f97212d4', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Sat, 02 May 2020 20:00:30 GMT' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') - .query(true) - .reply(200, {"modelInfo":{"modelId":"5b08cfcc-850f-42c0-97e5-a297ea26a5b3","status":"ready","createdDateTime":"2020-05-02T20:00:25Z","lastUpdatedDateTime":"2020-05-02T20:00:32Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Address:","Company Name:","Company Phone:","Dated As:","Email:","Hero Limited","Name:","Phone:","Phone:","Purchase Order","Purchase Order","Purchase Order #:","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '40', - 'apim-request-id', - 'f51d423c-e98a-47e0-bc58-a91fd022bd79', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 20:00:35 GMT' + 'Fri, 26 Jun 2020 21:24:10 GMT', + 'Connection', + 'close' ]); From 1a88c485c50ee1814ffb54ec52b2c9dc2a6f04ee Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Fri, 26 Jun 2020 15:30:43 -0700 Subject: [PATCH 3/5] FR resource should also be created in westcentralus --- sdk/formrecognizer/test-resources.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/formrecognizer/test-resources.json b/sdk/formrecognizer/test-resources.json index d63494b6b479..4e7bc52a8192 100644 --- a/sdk/formrecognizer/test-resources.json +++ b/sdk/formrecognizer/test-resources.json @@ -79,7 +79,7 @@ "name": "S0" }, "kind": "FormRecognizer", - "location": "[resourceGroup().location]", + "location": "[parameters('location')]", "properties": { "customSubDomainName": "[parameters('baseName')]" } From d549c91f11efd834820cc40c647c22a7c4c44f38 Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Fri, 26 Jun 2020 15:41:45 -0700 Subject: [PATCH 4/5] Revert "Remove some creating polling state from recording" This reverts commit 669c0e44f27edd6d8a34547db9e126b6cf37717e. --- .../recording_copies_model.js | 84 +++++++++++++++++++ ...ding_trains_model_with_forms_and_labels.js | 76 ++++++++++++----- ...g_trains_model_with_forms_and_no_labels.js | 76 ++++++++++++----- ...rms_and_no_labels_including_sub_folders.js | 76 ++++++++++++----- ..._forms_and_no_labels_specifying_prefix_.js | 68 ++++++++------- 5 files changed, 289 insertions(+), 91 deletions(-) diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js index 6451f5bf7a1d..c5947e30e926 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js @@ -48,6 +48,90 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'close' ]); +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '17', + 'apim-request-id', + 'b06eec3e-69f4-4da3-847c-2e2be31ef887', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:17 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '19', + 'apim-request-id', + 'df40c290-1d3a-4d13-9dc0-0638d5f48a8a', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:17 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '18', + 'apim-request-id', + '74138daa-151e-4ff9-8395-a43258b7ba26', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:23 GMT', + 'Connection', + 'close' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '92', + 'apim-request-id', + '75db5e0d-8c39-4596-9df5-5cd556270f04', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Fri, 26 Jun 2020 21:24:27 GMT', + 'Connection', + 'close' +]); + nock('https://endpoint:443', {"encodedQueryParams":true}) .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js index ada580fccafd..43996d8a68dc 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "cad1a0d190f552be0293f81c20b80044"; +module.exports.hash = "5a98b0b4f208c33690bb9023a8a45c33"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -10,61 +10,95 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Content-Length', '0', 'Location', - 'https://endpoint/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279', 'x-envoy-upstream-service-time', - '5093', + '43', 'apim-request-id', - '866a1217-6c0b-491f-bbbe-f5b666017852', + '34098037-97a2-406f-a674-f56b31b7f1db', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:26 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:04 GMT' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb') + .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') .query(true) - .reply(200, {"modelInfo":{"modelId":"8868c5b9-2248-4650-b906-a30bd14196bb","status":"creating","createdDateTime":"2020-06-26T21:23:22Z","lastUpdatedDateTime":"2020-06-26T21:23:22Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"7f954280-8212-4c61-9c33-8fea2e47d279","status":"creating","createdDateTime":"2020-05-02T20:00:04Z","lastUpdatedDateTime":"2020-05-02T20:00:04Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '23', + '31', 'apim-request-id', - '2b4f9d53-b8c9-4aab-a13c-e4e1f28bbe0a', + '5e601f0c-7b99-4928-8cd8-46863156553d', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:32 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:04 GMT' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb') + .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') .query(true) - .reply(200, {"modelInfo":{"modelId":"8868c5b9-2248-4650-b906-a30bd14196bb","status":"ready","createdDateTime":"2020-06-26T21:23:22Z","lastUpdatedDateTime":"2020-06-26T21:23:36Z"},"trainResult":{"averageModelAccuracy":0.973,"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"status":"succeeded"}],"fields":[{"fieldName":"CompanyAddress","accuracy":0.8},{"fieldName":"CompanyName","accuracy":1},{"fieldName":"CompanyPhoneNumber","accuracy":1},{"fieldName":"DatedAs","accuracy":1},{"fieldName":"Email","accuracy":0.8},{"fieldName":"Merchant","accuracy":1},{"fieldName":"PhoneNumber","accuracy":1},{"fieldName":"PurchaseOrderNumber","accuracy":1},{"fieldName":"Quantity","accuracy":1},{"fieldName":"Signature","accuracy":1},{"fieldName":"Subtotal","accuracy":1},{"fieldName":"Tax","accuracy":1},{"fieldName":"Total","accuracy":1},{"fieldName":"VendorName","accuracy":1},{"fieldName":"Website","accuracy":1}],"errors":[]}}, [ + .reply(200, {"modelInfo":{"modelId":"7f954280-8212-4c61-9c33-8fea2e47d279","status":"creating","createdDateTime":"2020-05-02T20:00:04Z","lastUpdatedDateTime":"2020-05-02T20:00:04Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '18', + '48', 'apim-request-id', - 'b5892068-1533-4b07-911f-0dc9abdb9429', + 'b139f1d7-3a2e-43ef-ae74-396dea5c1388', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:37 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:04 GMT' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') + .query(true) + .reply(200, {"modelInfo":{"modelId":"7f954280-8212-4c61-9c33-8fea2e47d279","status":"creating","createdDateTime":"2020-05-02T20:00:04Z","lastUpdatedDateTime":"2020-05-02T20:00:04Z"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '27', + 'apim-request-id', + '370aac86-e5a3-4069-ad0b-6726f0e905af', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Sat, 02 May 2020 20:00:09 GMT' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') + .query(true) + .reply(200, {"modelInfo":{"modelId":"7f954280-8212-4c61-9c33-8fea2e47d279","status":"ready","createdDateTime":"2020-05-02T20:00:04Z","lastUpdatedDateTime":"2020-05-02T20:00:12Z"},"trainResult":{"averageModelAccuracy":0.973,"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"status":"succeeded"}],"fields":[{"fieldName":"CompanyAddress","accuracy":0.8},{"fieldName":"CompanyName","accuracy":1},{"fieldName":"CompanyPhoneNumber","accuracy":1},{"fieldName":"DatedAs","accuracy":1},{"fieldName":"Email","accuracy":0.8},{"fieldName":"Merchant","accuracy":1},{"fieldName":"PhoneNumber","accuracy":1},{"fieldName":"PurchaseOrderNumber","accuracy":1},{"fieldName":"Quantity","accuracy":1},{"fieldName":"Signature","accuracy":1},{"fieldName":"Subtotal","accuracy":1},{"fieldName":"Tax","accuracy":1},{"fieldName":"Total","accuracy":1},{"fieldName":"VendorName","accuracy":1},{"fieldName":"Website","accuracy":1}],"errors":[]}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '29', + 'apim-request-id', + '2c23e3c3-4c7b-4304-b058-1b26feba5c61', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Sat, 02 May 2020 20:00:15 GMT' ]); diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js index 93ce47748f4c..3beb90b681b2 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "c8c4a8dfbb5b81bc885b80a28093ea14"; +module.exports.hash = "bb482db3fb10d0ee44e322df4f19ed76"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -10,61 +10,95 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Content-Length', '0', 'Location', - 'https://endpoint/formrecognizer/v2.0-preview/custom/models/97ffff4a-c78c-48e5-8a60-5644bf3f3bf0', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710', 'x-envoy-upstream-service-time', - '514', + '49', 'apim-request-id', - '510d9a9c-b393-4fc8-b84d-ef01a6c3fd2c', + 'bc1f9d21-38e8-4db7-b38c-43615e93ffe2', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:09 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 19:59:54 GMT' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/97ffff4a-c78c-48e5-8a60-5644bf3f3bf0') + .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') .query(true) - .reply(200, {"modelInfo":{"modelId":"97ffff4a-c78c-48e5-8a60-5644bf3f3bf0","status":"creating","createdDateTime":"2020-06-26T21:23:09Z","lastUpdatedDateTime":"2020-06-26T21:23:09Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"80d87355-5d05-40b3-9dc3-1a7c384ff710","status":"creating","createdDateTime":"2020-05-02T19:59:54Z","lastUpdatedDateTime":"2020-05-02T19:59:54Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '17', + '35', 'apim-request-id', - '9bf5ccc6-81fb-4bbf-96b1-c190e8728829', + 'c20e75f8-57bb-4fd5-8e30-4aa68a56512c', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:15 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 19:59:54 GMT' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/97ffff4a-c78c-48e5-8a60-5644bf3f3bf0') + .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') .query(true) - .reply(200, {"modelInfo":{"modelId":"97ffff4a-c78c-48e5-8a60-5644bf3f3bf0","status":"ready","createdDateTime":"2020-06-26T21:23:09Z","lastUpdatedDateTime":"2020-06-26T21:23:20Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Company Name:","Company Phone:","Dated As:","Details","Email:","Hero Limited","Name:","Phone:","Purchase Order","Purchase Order #:","Quantity","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Total","Unit Price","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ + .reply(200, {"modelInfo":{"modelId":"80d87355-5d05-40b3-9dc3-1a7c384ff710","status":"creating","createdDateTime":"2020-05-02T19:59:54Z","lastUpdatedDateTime":"2020-05-02T19:59:54Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '22', + '31', 'apim-request-id', - '9366caf5-2149-4259-9a44-a61f5aa01d34', + '4622e343-6e8d-4ea9-8f86-2e009079d9fc', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:21 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 19:59:54 GMT' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') + .query(true) + .reply(200, {"modelInfo":{"modelId":"80d87355-5d05-40b3-9dc3-1a7c384ff710","status":"creating","createdDateTime":"2020-05-02T19:59:54Z","lastUpdatedDateTime":"2020-05-02T19:59:54Z"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '26', + 'apim-request-id', + 'b9febf6c-4c1f-482c-ad6c-ba416f9b2201', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Sat, 02 May 2020 19:59:58 GMT' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') + .query(true) + .reply(200, {"modelInfo":{"modelId":"80d87355-5d05-40b3-9dc3-1a7c384ff710","status":"ready","createdDateTime":"2020-05-02T19:59:54Z","lastUpdatedDateTime":"2020-05-02T20:00:02Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Address:","Company Name:","Company Phone:","Dated As:","Email:","Hero Limited","Name:","Phone:","Phone:","Purchase Order","Purchase Order","Purchase Order #:","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '25', + 'apim-request-id', + '459fecc5-4dd2-479f-a736-d895d339aff1', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Sat, 02 May 2020 20:00:04 GMT' ]); diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js index fc83175ae6e6..ffaa412fb287 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "58fbaa91b6fba6809a20a30c720cc589"; +module.exports.hash = "60455a0a4014aea1a6797571858e33c5"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -10,61 +10,95 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Content-Length', '0', 'Location', - 'https://endpoint/formrecognizer/v2.0-preview/custom/models/f2e54f61-06a6-4159-a378-5a6ee061dbd6', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5', 'x-envoy-upstream-service-time', - '529', + '42', 'apim-request-id', - '814c032a-79f1-42e6-8674-2153a113a2b7', + 'bdcc413f-5fe6-46e7-a30f-1fcf0aaf9809', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:37 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:15 GMT' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/f2e54f61-06a6-4159-a378-5a6ee061dbd6') + .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') .query(true) - .reply(200, {"modelInfo":{"modelId":"f2e54f61-06a6-4159-a378-5a6ee061dbd6","status":"creating","createdDateTime":"2020-06-26T21:23:38Z","lastUpdatedDateTime":"2020-06-26T21:23:38Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"9fc504f6-293c-4c40-a581-e41ae22b40e5","status":"creating","createdDateTime":"2020-05-02T20:00:15Z","lastUpdatedDateTime":"2020-05-02T20:00:15Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '34', + '24', 'apim-request-id', - 'c59de33f-71f4-46c5-89f6-1660f33d8501', + 'f31df9fc-7803-41d5-b16f-6e6f2b47df0b', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:43 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:15 GMT' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/f2e54f61-06a6-4159-a378-5a6ee061dbd6') + .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') .query(true) - .reply(200, {"modelInfo":{"modelId":"f2e54f61-06a6-4159-a378-5a6ee061dbd6","status":"ready","createdDateTime":"2020-06-26T21:23:38Z","lastUpdatedDateTime":"2020-06-26T21:23:47Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Company Name:","Company Phone:","Dated As:","Details","Email:","Hero Limited","Name:","Phone:","Purchase Order","Purchase Order #:","Quantity","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Total","Unit Price","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"subfolder/Form_6.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ + .reply(200, {"modelInfo":{"modelId":"9fc504f6-293c-4c40-a581-e41ae22b40e5","status":"creating","createdDateTime":"2020-05-02T20:00:15Z","lastUpdatedDateTime":"2020-05-02T20:00:15Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '16', + '30', 'apim-request-id', - '46d2c27c-954e-4cdf-b014-2e963e640e63', + 'b5a3d8be-3b9c-4c98-9bdd-b121f9639185', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:48 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:15 GMT' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') + .query(true) + .reply(200, {"modelInfo":{"modelId":"9fc504f6-293c-4c40-a581-e41ae22b40e5","status":"creating","createdDateTime":"2020-05-02T20:00:15Z","lastUpdatedDateTime":"2020-05-02T20:00:15Z"}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '55', + 'apim-request-id', + '26b71488-cd5e-44de-847b-fb3c17f3cce4', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Sat, 02 May 2020 20:00:20 GMT' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') + .query(true) + .reply(200, {"modelInfo":{"modelId":"9fc504f6-293c-4c40-a581-e41ae22b40e5","status":"ready","createdDateTime":"2020-05-02T20:00:15Z","lastUpdatedDateTime":"2020-05-02T20:00:24Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Address:","Company Name:","Company Phone:","Dated As:","Email:","Hero Limited","Name:","Phone:","Phone:","Purchase Order","Purchase Order","Purchase Order #:","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"subfolder/Form_6.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '30', + 'apim-request-id', + 'd1a50997-ef3a-4a07-8e53-491354d20686', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Sat, 02 May 2020 20:00:25 GMT' ]); diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js index 1f44813b9583..911b9dff0ea2 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js @@ -1,6 +1,6 @@ let nock = require('nock'); -module.exports.hash = "4064d861ee46e22e616bc19919f56523"; +module.exports.hash = "059836df5122d8879ba53355614de9b6"; module.exports.testInfo = {"uniqueName":{},"newDate":{}} @@ -10,83 +10,95 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Content-Length', '0', 'Location', - 'https://endpoint/formrecognizer/v2.0-preview/custom/models/11748e70-c006-45f8-8681-772c1cecbafb', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3', 'x-envoy-upstream-service-time', - '605', + '44', 'apim-request-id', - '91821134-2d57-4206-ad08-ee11688f56c4', + 'f6a8585b-87e8-4f0b-94ce-1f1cfe919465', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:48 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:25 GMT' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/11748e70-c006-45f8-8681-772c1cecbafb') + .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') .query(true) - .reply(200, {"modelInfo":{"modelId":"11748e70-c006-45f8-8681-772c1cecbafb","status":"creating","createdDateTime":"2020-06-26T21:23:49Z","lastUpdatedDateTime":"2020-06-26T21:23:49Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"5b08cfcc-850f-42c0-97e5-a297ea26a5b3","status":"creating","createdDateTime":"2020-05-02T20:00:25Z","lastUpdatedDateTime":"2020-05-02T20:00:25Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '27', + '29', 'apim-request-id', - 'f4ddc3ee-535b-4c4f-9b53-89ccae917582', + 'bc4870f5-9479-46e5-9400-9a1c43d5cb77', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:49 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:25 GMT' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/11748e70-c006-45f8-8681-772c1cecbafb') + .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') .query(true) - .reply(200, {"modelInfo":{"modelId":"11748e70-c006-45f8-8681-772c1cecbafb","status":"creating","createdDateTime":"2020-06-26T21:23:49Z","lastUpdatedDateTime":"2020-06-26T21:23:49Z"}}, [ + .reply(200, {"modelInfo":{"modelId":"5b08cfcc-850f-42c0-97e5-a297ea26a5b3","status":"creating","createdDateTime":"2020-05-02T20:00:25Z","lastUpdatedDateTime":"2020-05-02T20:00:25Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '19', + '31', 'apim-request-id', - '685da4df-08d7-48e0-bbe3-b60b5f67e040', + '22ae0a99-ef96-4b17-86e7-b78c05969cdf', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:23:59 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:25 GMT' ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/11748e70-c006-45f8-8681-772c1cecbafb') + .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') .query(true) - .reply(200, {"modelInfo":{"modelId":"11748e70-c006-45f8-8681-772c1cecbafb","status":"ready","createdDateTime":"2020-06-26T21:23:49Z","lastUpdatedDateTime":"2020-06-26T21:24:00Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Company Name:","Company Phone:","Dated As:","Details","Email:","Hero Limited","Name:","Phone:","Purchase Order","Purchase Order #:","Quantity","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Total","Unit Price","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ + .reply(200, {"modelInfo":{"modelId":"5b08cfcc-850f-42c0-97e5-a297ea26a5b3","status":"creating","createdDateTime":"2020-05-02T20:00:25Z","lastUpdatedDateTime":"2020-05-02T20:00:25Z"}}, [ 'Transfer-Encoding', 'chunked', 'Content-Type', 'application/json; charset=utf-8', 'x-envoy-upstream-service-time', - '5055', + '24', 'apim-request-id', - '76214559-088b-43b1-a015-5a71f97212d4', + '30b136d2-7480-47c8-bde6-8ea1212b9357', 'Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload', 'x-content-type-options', 'nosniff', 'Date', - 'Fri, 26 Jun 2020 21:24:10 GMT', - 'Connection', - 'close' + 'Sat, 02 May 2020 20:00:30 GMT' +]); + +nock('https://endpoint:443', {"encodedQueryParams":true}) + .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') + .query(true) + .reply(200, {"modelInfo":{"modelId":"5b08cfcc-850f-42c0-97e5-a297ea26a5b3","status":"ready","createdDateTime":"2020-05-02T20:00:25Z","lastUpdatedDateTime":"2020-05-02T20:00:32Z"},"keys":{"clusters":{"0":["Additional Notes:","Address:","Address:","Company Name:","Company Phone:","Dated As:","Email:","Hero Limited","Name:","Phone:","Phone:","Purchase Order","Purchase Order","Purchase Order #:","SUBTOTAL","Seattle, WA 93849 Phone:","Shipped From","Shipped To","TAX","TOTAL","Vendor Name:","Website:"]}},"trainResult":{"trainingDocuments":[{"documentName":"Form_1.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_2.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_3.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_4.jpg","pages":1,"errors":[],"status":"succeeded"},{"documentName":"Form_5.jpg","pages":1,"errors":[],"status":"succeeded"}],"errors":[]}}, [ + 'Transfer-Encoding', + 'chunked', + 'Content-Type', + 'application/json; charset=utf-8', + 'x-envoy-upstream-service-time', + '40', + 'apim-request-id', + 'f51d423c-e98a-47e0-bc58-a91fd022bd79', + 'Strict-Transport-Security', + 'max-age=31536000; includeSubDomains; preload', + 'x-content-type-options', + 'nosniff', + 'Date', + 'Sat, 02 May 2020 20:00:35 GMT' ]); From 847afd6d8fe113b41d5915c9e471ac9cdec8a2dd Mon Sep 17 00:00:00 2001 From: Jeremy Meng Date: Fri, 26 Jun 2020 15:56:21 -0700 Subject: [PATCH 5/5] Use model id from old recordings for copy model recorded tests --- .../recording_copies_model.js | 73 ++----------------- ...ding_trains_model_with_forms_and_labels.js | 20 ----- ...g_trains_model_with_forms_and_no_labels.js | 20 ----- ...rms_and_no_labels_including_sub_folders.js | 20 ----- ..._forms_and_no_labels_specifying_prefix_.js | 20 ----- 5 files changed, 5 insertions(+), 148 deletions(-) diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js index c5947e30e926..3e46649937ab 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_copies_model.js @@ -28,12 +28,12 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copy', {"targetResourceId":"/subscriptions/e1367d46-77d4-4f57-8cfe-348edbdc84a3/resourceGroups/jstests/providers/Microsoft.CognitiveServices/accounts/jstests-fr","targetResourceRegion":"westus2","copyAuthorization":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2","accessToken":"accessToken","expirationDateTimeTicks":1593293052}}) + .post('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279/copy', {"targetResourceId":"/subscriptions/e1367d46-77d4-4f57-8cfe-348edbdc84a3/resourceGroups/jstests/providers/Microsoft.CognitiveServices/accounts/jstests-fr","targetResourceRegion":"westus2","copyAuthorization":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2","accessToken":"accessToken","expirationDateTimeTicks":1593293052}}) .reply(202, "", [ 'Content-Length', '0', 'Operation-Location', - 'https://endpoint/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyresults/eefd4da6-4503-4542-99bb-eee373b53f7e', + 'https://endpoint/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279/copyresults/eefd4da6-4503-4542-99bb-eee373b53f7e', 'x-envoy-upstream-service-time', '5085', 'apim-request-id', @@ -49,7 +49,7 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ 'Transfer-Encoding', 'chunked', @@ -70,7 +70,7 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ 'Transfer-Encoding', 'chunked', @@ -91,70 +91,7 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) ]); nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') - .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '18', - 'apim-request-id', - '74138daa-151e-4ff9-8395-a43258b7ba26', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Fri, 26 Jun 2020 21:24:23 GMT', - 'Connection', - 'close' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') - .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '92', - 'apim-request-id', - '75db5e0d-8c39-4596-9df5-5cd556270f04', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Fri, 26 Jun 2020 21:24:27 GMT', - 'Connection', - 'close' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') - .reply(200, {"status":"notStarted","createdDateTime":"2020-06-26T21:24:12Z","lastUpdatedDateTime":"2020-06-26T21:24:12Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '15', - 'apim-request-id', - '9ae58ed9-e980-43a5-8153-aa1fd0b41794', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Fri, 26 Jun 2020 21:24:32 GMT', - 'Connection', - 'close' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/8868c5b9-2248-4650-b906-a30bd14196bb/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') + .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279/copyResults/eefd4da6-4503-4542-99bb-eee373b53f7e') .reply(200, {"status":"succeeded","createdDateTime":"2020-06-26T21:24:36.5192716Z","lastUpdatedDateTime":"2020-06-26T21:24:36.5192718Z","copyResult":{"modelId":"be7f15e3-1b1e-43da-a133-d2869763f3c2"}}, [ 'Transfer-Encoding', 'chunked', diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js index 43996d8a68dc..bfa11d6c2bbc 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_labels.js @@ -43,26 +43,6 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Sat, 02 May 2020 20:00:04 GMT' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') - .query(true) - .reply(200, {"modelInfo":{"modelId":"7f954280-8212-4c61-9c33-8fea2e47d279","status":"creating","createdDateTime":"2020-05-02T20:00:04Z","lastUpdatedDateTime":"2020-05-02T20:00:04Z"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '48', - 'apim-request-id', - 'b139f1d7-3a2e-43ef-ae74-396dea5c1388', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 20:00:04 GMT' -]); - nock('https://endpoint:443', {"encodedQueryParams":true}) .get('/formrecognizer/v2.0-preview/custom/models/7f954280-8212-4c61-9c33-8fea2e47d279') .query(true) diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js index 3beb90b681b2..3dfcdcb2b7ed 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels.js @@ -43,26 +43,6 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Sat, 02 May 2020 19:59:54 GMT' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') - .query(true) - .reply(200, {"modelInfo":{"modelId":"80d87355-5d05-40b3-9dc3-1a7c384ff710","status":"creating","createdDateTime":"2020-05-02T19:59:54Z","lastUpdatedDateTime":"2020-05-02T19:59:54Z"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '31', - 'apim-request-id', - '4622e343-6e8d-4ea9-8f86-2e009079d9fc', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 19:59:54 GMT' -]); - nock('https://endpoint:443', {"encodedQueryParams":true}) .get('/formrecognizer/v2.0-preview/custom/models/80d87355-5d05-40b3-9dc3-1a7c384ff710') .query(true) diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js index ffaa412fb287..47ef9402dda6 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_including_sub_folders.js @@ -43,26 +43,6 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Sat, 02 May 2020 20:00:15 GMT' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') - .query(true) - .reply(200, {"modelInfo":{"modelId":"9fc504f6-293c-4c40-a581-e41ae22b40e5","status":"creating","createdDateTime":"2020-05-02T20:00:15Z","lastUpdatedDateTime":"2020-05-02T20:00:15Z"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '30', - 'apim-request-id', - 'b5a3d8be-3b9c-4c98-9bdd-b121f9639185', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 20:00:15 GMT' -]); - nock('https://endpoint:443', {"encodedQueryParams":true}) .get('/formrecognizer/v2.0-preview/custom/models/9fc504f6-293c-4c40-a581-e41ae22b40e5') .query(true) diff --git a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js index 911b9dff0ea2..4fa9e0c85e92 100644 --- a/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js +++ b/sdk/formrecognizer/ai-form-recognizer/recordings/node/formtrainingclient_nodejs_only/recording_trains_model_with_forms_and_no_labels_specifying_prefix_.js @@ -43,26 +43,6 @@ nock('https://endpoint:443', {"encodedQueryParams":true}) 'Sat, 02 May 2020 20:00:25 GMT' ]); -nock('https://endpoint:443', {"encodedQueryParams":true}) - .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') - .query(true) - .reply(200, {"modelInfo":{"modelId":"5b08cfcc-850f-42c0-97e5-a297ea26a5b3","status":"creating","createdDateTime":"2020-05-02T20:00:25Z","lastUpdatedDateTime":"2020-05-02T20:00:25Z"}}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'x-envoy-upstream-service-time', - '31', - 'apim-request-id', - '22ae0a99-ef96-4b17-86e7-b78c05969cdf', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Sat, 02 May 2020 20:00:25 GMT' -]); - nock('https://endpoint:443', {"encodedQueryParams":true}) .get('/formrecognizer/v2.0-preview/custom/models/5b08cfcc-850f-42c0-97e5-a297ea26a5b3') .query(true)