From d3220cd155a961f51ae782b79b178de591f82f1d Mon Sep 17 00:00:00 2001 From: Will Temple Date: Fri, 5 Jun 2020 14:56:16 -0700 Subject: [PATCH 1/2] Removed a couple of old recordings --- ...uces_an_error_on_invalid_country_hint.json | 50 ---------------- ...oduces_an_error_on_invalid_country_hint.js | 57 ------------------- 2 files changed, 107 deletions(-) delete mode 100644 sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.json delete mode 100644 sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.js diff --git a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.json b/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.json deleted file mode 100644 index d60d765be962..000000000000 --- a/sdk/textanalytics/ai-text-analytics/recordings/browsers/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "recordings": [ - { - "method": "POST", - "url": "https://login.microsoftonline.com/azure_tenant_id/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%2Fcognitiveservices.azure.com%2F.default", - "status": 200, - "response": "{\"token_type\":\"Bearer\",\"expires_in\":3599,\"ext_expires_in\":3599,\"access_token\":\"access_token\"}", - "responseHeaders": { - "cache-control": "no-cache, no-store", - "content-length": "1417", - "content-type": "application/json; charset=utf-8", - "date": "Wed, 05 Feb 2020 23:51:00 GMT", - "expires": "-1", - "p3p": "CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", - "pragma": "no-cache", - "referrer-policy": "strict-origin-when-cross-origin", - "strict-transport-security": "max-age=31536000; includeSubDomains", - "x-content-type-options": "nosniff", - "x-ms-ests-server": "2.1.9987.14 - SAN ProdSlices", - "x-ms-request-id": "182c1c08-935c-465a-96df-e9c9aa102000" - } - }, - { - "method": "POST", - "url": "https://endpoint/text/analytics/v3.0-preview.1/languages", - "query": {}, - "requestBody": "{\"documents\":[{\"id\":\"0\",\"text\":\"hello\",\"countryHint\":\"invalidcountry\"}]}", - "status": 200, - "response": "{\"documents\":[],\"errors\":[{\"id\":\"0\",\"error\":{\"code\":\"InvalidArgument\",\"innerError\":{\"code\":\"InvalidDocument\",\"message\":\"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code.\"},\"message\":\"Invalid Country Hint.\"}}],\"modelVersion\":\"2019-10-01\"}", - "responseHeaders": { - "access-control-allow-origin": "*", - "access-control-expose-headers": "Operation-Location", - "apim-request-id": "c58ae0d9-4b57-4c94-89be-004eeb43f248", - "content-type": "application/json; charset=utf-8", - "csp-billing-usage": "CognitiveServices.TextAnalytics.BatchScoring=0", - "date": "Wed, 05 Feb 2020 23:51:00 GMT", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-envoy-upstream-service-time": "4" - } - } - ], - "uniqueTestInfo": { - "uniqueName": {}, - "newDate": {} - } -} \ No newline at end of file diff --git a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.js b/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.js deleted file mode 100644 index fe14cab8fdb2..000000000000 --- a/sdk/textanalytics/ai-text-analytics/recordings/node/aad_textanalyticsclient_detectlanguage/recording_client_produces_an_error_on_invalid_country_hint.js +++ /dev/null @@ -1,57 +0,0 @@ -let nock = require('nock'); - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} - -nock('https://login.microsoftonline.com:443', {"encodedQueryParams":true}) - .post('/azure_tenant_id/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%2Fcognitiveservices.azure.com%2F.default") - .reply(200, {"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"access_token"}, [ - 'Cache-Control', - 'no-cache, no-store', - 'Pragma', - 'no-cache', - 'Content-Type', - 'application/json; charset=utf-8', - 'Expires', - '-1', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains', - 'X-Content-Type-Options', - 'nosniff', - 'x-ms-request-id', - '73e53a21-494e-4cd3-9781-8720f6231e00', - 'x-ms-ests-server', - '2.1.9987.14 - SAN ProdSlices', - 'P3P', - 'CP="DSP CUR OTPi IND OTRi ONL FIN"', - 'Set-Cookie', - 'fpc=AvQvOKkmbEJFh1E_pN3OZ-f0CyfMAQAAAOFLzdUOAAAA; expires=Fri, 06-Mar-2020 23:50:58 GMT; path=/; secure; HttpOnly; SameSite=None', - 'Set-Cookie', - 'x-ms-gateway-slice=corp; path=/; SameSite=None; secure; HttpOnly', - 'Set-Cookie', - 'stsservicecookie=estscorp; path=/; SameSite=None; secure; HttpOnly', - 'Date', - 'Wed, 05 Feb 2020 23:50:57 GMT', - 'Content-Length', - '1417' -]); - -nock('https://endpoint:443', {"encodedQueryParams":true}) - .post('/text/analytics/v3.0-preview.1/languages', {"documents":[{"id":"0","text":"hello","countryHint":"invalidcountry"}]}) - .reply(200, {"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","innerError":{"code":"InvalidDocument","message":"Country hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code."},"message":"Invalid Country Hint."}}],"modelVersion":"2019-10-01"}, [ - 'Transfer-Encoding', - 'chunked', - 'Content-Type', - 'application/json; charset=utf-8', - 'csp-billing-usage', - 'CognitiveServices.TextAnalytics.BatchScoring=0', - 'x-envoy-upstream-service-time', - '6', - 'apim-request-id', - '6d9cf140-0c79-4e40-b836-d7c2f40cf8ee', - 'Strict-Transport-Security', - 'max-age=31536000; includeSubDomains; preload', - 'x-content-type-options', - 'nosniff', - 'Date', - 'Wed, 05 Feb 2020 23:50:57 GMT' -]); From e3848ea87d617e1dc3a4edc7a62af81d93a9f551 Mon Sep 17 00:00:00 2001 From: Will Temple Date: Fri, 5 Jun 2020 14:57:19 -0700 Subject: [PATCH 2/2] Changed all preview version indicators to 1.0.0 --- sdk/textanalytics/ai-text-analytics/CHANGELOG.md | 4 ++++ sdk/textanalytics/ai-text-analytics/package.json | 2 +- sdk/textanalytics/ai-text-analytics/src/constants.ts | 2 +- .../src/generated/generatedClientContext.ts | 8 ++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sdk/textanalytics/ai-text-analytics/CHANGELOG.md b/sdk/textanalytics/ai-text-analytics/CHANGELOG.md index e0642908e241..87cc3e5f9bc9 100644 --- a/sdk/textanalytics/ai-text-analytics/CHANGELOG.md +++ b/sdk/textanalytics/ai-text-analytics/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.0.0 (2020-06-09) + +- This release marks the general availability of the `@azure/ai-text-analytics` package. + ## 1.0.0-preview.5 (2020-05-26) - [Breaking] Renamed all result array types that extend JavaScript's base `Array` class to end with the word `Array` instead of `Collection` (e.g. `AnalyzeSentimentResultCollection` is now `AnalyzeSentimentResultArray`) - [Breaking] Renamed `score` to `confidenceScore` in the `Match`, `Entity`, and `DetectedLanguage` types. diff --git a/sdk/textanalytics/ai-text-analytics/package.json b/sdk/textanalytics/ai-text-analytics/package.json index 1304c0d4e719..b95f2244044d 100644 --- a/sdk/textanalytics/ai-text-analytics/package.json +++ b/sdk/textanalytics/ai-text-analytics/package.json @@ -3,7 +3,7 @@ "sdk-type": "client", "author": "Microsoft Corporation", "description": "An isomorphic client library for the Azure Text Analytics service.", - "version": "1.0.0-preview.5", + "version": "1.0.0", "keywords": [ "node", "azure", diff --git a/sdk/textanalytics/ai-text-analytics/src/constants.ts b/sdk/textanalytics/ai-text-analytics/src/constants.ts index 0ce59c1d5d93..74649cd0dec9 100644 --- a/sdk/textanalytics/ai-text-analytics/src/constants.ts +++ b/sdk/textanalytics/ai-text-analytics/src/constants.ts @@ -1,4 +1,4 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export const SDK_VERSION: string = "1.0.0-preview.5"; +export const SDK_VERSION: string = "1.0.0"; diff --git a/sdk/textanalytics/ai-text-analytics/src/generated/generatedClientContext.ts b/sdk/textanalytics/ai-text-analytics/src/generated/generatedClientContext.ts index 47374353d21e..43d8a601793e 100644 --- a/sdk/textanalytics/ai-text-analytics/src/generated/generatedClientContext.ts +++ b/sdk/textanalytics/ai-text-analytics/src/generated/generatedClientContext.ts @@ -11,7 +11,7 @@ import * as coreHttp from "@azure/core-http"; const packageName = "@azure/ai-text-analytics"; -const packageVersion = "1.0.0-preview.5"; +const packageVersion = "1.0.0"; export class GeneratedClientContext extends coreHttp.ServiceClient { endpoint: string; @@ -24,7 +24,11 @@ export class GeneratedClientContext extends coreHttp.ServiceClient { * @param credentials Subscription credentials which uniquely identify client subscription. * @param [options] The parameter options */ - constructor(credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials, endpoint: string, options?: coreHttp.ServiceClientOptions) { + constructor( + credentials: coreHttp.TokenCredential | coreHttp.ServiceClientCredentials, + endpoint: string, + options?: coreHttp.ServiceClientOptions + ) { if (endpoint == undefined) { throw new Error("'endpoint' cannot be null."); }