@azure/ai-text-analytics 5.2.0-beta.1 → 6.0.0-alpha.20220517.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +376 -132
- package/dist/index.js +2803 -3497
- package/dist/index.js.map +1 -1
- package/dist-esm/src/azureKeyCredentialPolicy.js +2 -2
- package/dist-esm/src/azureKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/src/constants.js +16 -0
- package/dist-esm/src/constants.js.map +1 -0
- package/dist-esm/src/generated/generatedClient.js +80 -334
- package/dist-esm/src/generated/generatedClient.js.map +1 -1
- package/dist-esm/src/generated/index.js +1 -1
- package/dist-esm/src/generated/index.js.map +1 -1
- package/dist-esm/src/generated/models/index.js +106 -35
- package/dist-esm/src/generated/models/index.js.map +1 -1
- package/dist-esm/src/generated/models/mappers.js +1607 -1464
- package/dist-esm/src/generated/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/models/parameters.js +18 -104
- package/dist-esm/src/generated/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/operations/analyzeText.js +105 -0
- package/dist-esm/src/generated/operations/analyzeText.js.map +1 -0
- package/dist-esm/src/generated/operations/index.js +9 -0
- package/dist-esm/src/generated/operations/index.js.map +1 -0
- package/dist-esm/src/generated/operationsInterfaces/analyzeText.js +9 -0
- package/dist-esm/src/generated/operationsInterfaces/analyzeText.js.map +1 -0
- package/dist-esm/src/generated/operationsInterfaces/index.js +9 -0
- package/dist-esm/src/generated/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/index.js +14 -5
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/lro.js +195 -0
- package/dist-esm/src/lro.js.map +1 -0
- package/dist-esm/src/models.js +42 -0
- package/dist-esm/src/models.js.map +1 -0
- package/dist-esm/src/textAnalysisClient.js +197 -0
- package/dist-esm/src/textAnalysisClient.js.map +1 -0
- package/dist-esm/src/transforms.js +279 -0
- package/dist-esm/src/transforms.js.map +1 -0
- package/dist-esm/src/util.js +36 -158
- package/dist-esm/src/util.js.map +1 -1
- package/package.json +28 -38
- package/types/ai-text-analytics.d.ts +1432 -1143
- package/CHANGELOG.md +0 -143
- package/LICENSE +0 -21
- package/dist-esm/src/analyzeActionsResult.js +0 -167
- package/dist-esm/src/analyzeActionsResult.js.map +0 -1
- package/dist-esm/src/analyzeHealthcareEntitiesResult.js +0 -53
- package/dist-esm/src/analyzeHealthcareEntitiesResult.js.map +0 -1
- package/dist-esm/src/analyzeLro.js +0 -130
- package/dist-esm/src/analyzeLro.js.map +0 -1
- package/dist-esm/src/analyzeSentimentResult.js +0 -74
- package/dist-esm/src/analyzeSentimentResult.js.map +0 -1
- package/dist-esm/src/analyzeSentimentResultArray.js +0 -11
- package/dist-esm/src/analyzeSentimentResultArray.js.map +0 -1
- package/dist-esm/src/detectLanguageResult.js +0 -17
- package/dist-esm/src/detectLanguageResult.js.map +0 -1
- package/dist-esm/src/detectLanguageResultArray.js +0 -11
- package/dist-esm/src/detectLanguageResultArray.js.map +0 -1
- package/dist-esm/src/extractKeyPhrasesResult.js +0 -17
- package/dist-esm/src/extractKeyPhrasesResult.js.map +0 -1
- package/dist-esm/src/extractKeyPhrasesResultArray.js +0 -11
- package/dist-esm/src/extractKeyPhrasesResultArray.js.map +0 -1
- package/dist-esm/src/extractSummaryResult.js +0 -17
- package/dist-esm/src/extractSummaryResult.js.map +0 -1
- package/dist-esm/src/extractSummaryResultArray.js +0 -11
- package/dist-esm/src/extractSummaryResultArray.js.map +0 -1
- package/dist-esm/src/generated/generatedClientContext.js +0 -42
- package/dist-esm/src/generated/generatedClientContext.js.map +0 -1
- package/dist-esm/src/healthLro.js +0 -131
- package/dist-esm/src/healthLro.js.map +0 -1
- package/dist-esm/src/paging.js +0 -83
- package/dist-esm/src/paging.js.map +0 -1
- package/dist-esm/src/pollerModels.js +0 -4
- package/dist-esm/src/pollerModels.js.map +0 -1
- package/dist-esm/src/recognizeCategorizedEntitiesResult.js +0 -17
- package/dist-esm/src/recognizeCategorizedEntitiesResult.js.map +0 -1
- package/dist-esm/src/recognizeCategorizedEntitiesResultArray.js +0 -11
- package/dist-esm/src/recognizeCategorizedEntitiesResultArray.js.map +0 -1
- package/dist-esm/src/recognizeLinkedEntitiesResult.js +0 -17
- package/dist-esm/src/recognizeLinkedEntitiesResult.js.map +0 -1
- package/dist-esm/src/recognizeLinkedEntitiesResultArray.js +0 -11
- package/dist-esm/src/recognizeLinkedEntitiesResultArray.js.map +0 -1
- package/dist-esm/src/recognizePiiEntitiesResult.js +0 -18
- package/dist-esm/src/recognizePiiEntitiesResult.js.map +0 -1
- package/dist-esm/src/recognizePiiEntitiesResultArray.js +0 -11
- package/dist-esm/src/recognizePiiEntitiesResultArray.js.map +0 -1
- package/dist-esm/src/textAnalyticsAction.js +0 -4
- package/dist-esm/src/textAnalyticsAction.js.map +0 -1
- package/dist-esm/src/textAnalyticsClient.js +0 -523
- package/dist-esm/src/textAnalyticsClient.js.map +0 -1
- package/dist-esm/src/textAnalyticsOperationOptions.js +0 -4
- package/dist-esm/src/textAnalyticsOperationOptions.js.map +0 -1
- package/dist-esm/src/textAnalyticsResult.js +0 -78
- package/dist-esm/src/textAnalyticsResult.js.map +0 -1
- package/dist-esm/src/tracing.js +0 -12
- package/dist-esm/src/tracing.js.map +0 -1
- package/dist-esm/src/utils/url.browser.js +0 -6
- package/dist-esm/src/utils/url.browser.js.map +0 -1
- package/dist-esm/src/utils/url.js +0 -4
- package/dist-esm/src/utils/url.js.map +0 -1
|
@@ -4,7 +4,7 @@ const API_KEY_HEADER_NAME = "Ocp-Apim-Subscription-Key";
|
|
|
4
4
|
/**
|
|
5
5
|
* The programmatic identifier of the textAnalyticsAzureKeyCredentialPolicy.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
const textAnalyticsAzureKeyCredentialPolicyName = "textAnalyticsAzureKeyCredentialPolicy";
|
|
8
8
|
/**
|
|
9
9
|
* Create an HTTP pipeline policy to authenticate a request
|
|
10
10
|
* using an `AzureKeyCredential` for Text Analytics
|
|
@@ -16,7 +16,7 @@ export function textAnalyticsAzureKeyCredentialPolicy(credential) {
|
|
|
16
16
|
sendRequest(request, next) {
|
|
17
17
|
request.headers.set(API_KEY_HEADER_NAME, credential.key);
|
|
18
18
|
return next(request);
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=azureKeyCredentialPolicy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureKeyCredentialPolicy.js","sourceRoot":"","sources":["../../src/azureKeyCredentialPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAExD;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"azureKeyCredentialPolicy.js","sourceRoot":"","sources":["../../src/azureKeyCredentialPolicy.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,MAAM,mBAAmB,GAAG,2BAA2B,CAAC;AAExD;;GAEG;AACH,MAAM,yCAAyC,GAAG,uCAAuC,CAAC;AAE1F;;;;GAIG;AACH,MAAM,UAAU,qCAAqC,CAAC,UAAyB;IAC7E,OAAO;QACL,IAAI,EAAE,yCAAyC;QAC/C,WAAW,CAAC,OAAwB,EAAE,IAAiB;YACrD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YACzD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n PipelinePolicy,\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport { KeyCredential } from \"@azure/core-auth\";\n\nconst API_KEY_HEADER_NAME = \"Ocp-Apim-Subscription-Key\";\n\n/**\n * The programmatic identifier of the textAnalyticsAzureKeyCredentialPolicy.\n */\nconst textAnalyticsAzureKeyCredentialPolicyName = \"textAnalyticsAzureKeyCredentialPolicy\";\n\n/**\n * Create an HTTP pipeline policy to authenticate a request\n * using an `AzureKeyCredential` for Text Analytics\n * @internal\n */\nexport function textAnalyticsAzureKeyCredentialPolicy(credential: KeyCredential): PipelinePolicy {\n return {\n name: textAnalyticsAzureKeyCredentialPolicyName,\n sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n request.headers.set(API_KEY_HEADER_NAME, credential.key);\n return next(request);\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
/**
|
|
4
|
+
* The default AAD permissions scope for Cognitive Services.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export const DEFAULT_COGNITIVE_SCOPE = "https://cognitiveservices.azure.com/.default";
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export const SDK_VERSION = "6.0.0-beta.1";
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export const clientName = "TextAnalysisClient";
|
|
16
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,8CAA8C,CAAC;AAEtF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * The default AAD permissions scope for Cognitive Services.\n * @internal\n */\nexport const DEFAULT_COGNITIVE_SCOPE = \"https://cognitiveservices.azure.com/.default\";\n\n/**\n * @internal\n */\nexport const SDK_VERSION = \"6.0.0-beta.1\";\n\n/**\n * @internal\n */\nexport const clientName = \"TextAnalysisClient\";\n"]}
|
|
@@ -6,366 +6,112 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
import * as coreClient from "@azure/core-client";
|
|
9
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
|
+
import { AnalyzeTextImpl } from "./operations";
|
|
9
11
|
import * as Parameters from "./models/parameters";
|
|
10
12
|
import * as Mappers from "./models/mappers";
|
|
11
|
-
import { GeneratedClientContext } from "./generatedClientContext";
|
|
12
13
|
/** @internal */
|
|
13
|
-
export class GeneratedClient extends
|
|
14
|
+
export class GeneratedClient extends coreClient.ServiceClient {
|
|
14
15
|
/**
|
|
15
16
|
* Initializes a new instance of the GeneratedClient class.
|
|
16
|
-
* @param endpoint Supported Cognitive Services
|
|
17
|
-
* https
|
|
17
|
+
* @param endpoint Supported Cognitive Services endpoint (e.g.,
|
|
18
|
+
* https://<resource-name>.api.cognitiveservices.azure.com).
|
|
18
19
|
* @param options The parameter options
|
|
19
20
|
*/
|
|
20
21
|
constructor(endpoint, options) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
health(input, options) {
|
|
63
|
-
return this.sendOperationRequest({ input, options }, healthOperationSpec);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* The API returns a list of general named entities in a given document. For the list of supported
|
|
67
|
-
* entity types, check <a href="https://aka.ms/taner">Supported Entity Types in Text Analytics API</a>.
|
|
68
|
-
* See the <a href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list
|
|
69
|
-
* of enabled languages.
|
|
70
|
-
* @param input Collection of documents to analyze.
|
|
71
|
-
* @param options The options parameters.
|
|
72
|
-
*/
|
|
73
|
-
entitiesRecognitionGeneral(input, options) {
|
|
74
|
-
return this.sendOperationRequest({ input, options }, entitiesRecognitionGeneralOperationSpec);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* The API returns a list of entities with personal information (\"SSN\", \"Bank Account\" etc) in the
|
|
78
|
-
* document. For the list of supported entity types, check <a href="https://aka.ms/tanerpii">Supported
|
|
79
|
-
* Entity Types in Text Analytics API</a>. See the <a href="https://aka.ms/talangs">Supported languages
|
|
80
|
-
* in Text Analytics API</a> for the list of enabled languages.
|
|
81
|
-
*
|
|
82
|
-
* @param input Collection of documents to analyze.
|
|
83
|
-
* @param options The options parameters.
|
|
84
|
-
*/
|
|
85
|
-
entitiesRecognitionPii(input, options) {
|
|
86
|
-
return this.sendOperationRequest({ input, options }, entitiesRecognitionPiiOperationSpec);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* The API returns a list of recognized entities with links to a well known knowledge base. See the <a
|
|
90
|
-
* href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled
|
|
91
|
-
* languages.
|
|
92
|
-
* @param input Collection of documents to analyze.
|
|
93
|
-
* @param options The options parameters.
|
|
94
|
-
*/
|
|
95
|
-
entitiesLinking(input, options) {
|
|
96
|
-
return this.sendOperationRequest({ input, options }, entitiesLinkingOperationSpec);
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* The API returns a list of strings denoting the key phrases in the input text. See the <a
|
|
100
|
-
* href="https://aka.ms/talangs">Supported languages in Text Analytics API</a> for the list of enabled
|
|
101
|
-
* languages.
|
|
102
|
-
* @param input Collection of documents to analyze.
|
|
103
|
-
* @param options The options parameters.
|
|
104
|
-
*/
|
|
105
|
-
keyPhrases(input, options) {
|
|
106
|
-
return this.sendOperationRequest({ input, options }, keyPhrasesOperationSpec);
|
|
22
|
+
var _a, _b;
|
|
23
|
+
if (endpoint === undefined) {
|
|
24
|
+
throw new Error("'endpoint' cannot be null");
|
|
25
|
+
}
|
|
26
|
+
// Initializing default values for options
|
|
27
|
+
if (!options) {
|
|
28
|
+
options = {};
|
|
29
|
+
}
|
|
30
|
+
const defaults = {
|
|
31
|
+
requestContentType: "application/json; charset=utf-8"
|
|
32
|
+
};
|
|
33
|
+
const packageDetails = `azsdk-js-ai-text-analytics/6.0.0-beta.1`;
|
|
34
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
35
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
36
|
+
: `${packageDetails}`;
|
|
37
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
38
|
+
userAgentPrefix
|
|
39
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{Endpoint}/language" });
|
|
40
|
+
super(optionsWithDefaults);
|
|
41
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
42
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
43
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
44
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
45
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
46
|
+
this.pipeline.removePolicy({
|
|
47
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
48
|
+
});
|
|
49
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
50
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
51
|
+
challengeCallbacks: {
|
|
52
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Parameter assignments
|
|
58
|
+
this.endpoint = endpoint;
|
|
59
|
+
// Assigning values to Constant parameters
|
|
60
|
+
this.apiVersion = options.apiVersion || "2022-04-01-preview";
|
|
61
|
+
this.analyzeText = new AnalyzeTextImpl(this);
|
|
62
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
107
63
|
}
|
|
108
|
-
/**
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
64
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
65
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
66
|
+
if (!apiVersion) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const apiVersionPolicy = {
|
|
70
|
+
name: "CustomApiVersionPolicy",
|
|
71
|
+
async sendRequest(request, next) {
|
|
72
|
+
const param = request.url.split("?");
|
|
73
|
+
if (param.length > 1) {
|
|
74
|
+
const newParams = param[1].split("&").map((item) => {
|
|
75
|
+
if (item.indexOf("api-version") > -1) {
|
|
76
|
+
return item.replace(/(?<==).*$/, apiVersion);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
return item;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
83
|
+
}
|
|
84
|
+
return next(request);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
118
88
|
}
|
|
119
89
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* @param input Collection of documents to analyze.
|
|
90
|
+
* Submit a collection of text documents for analysis. Specify a single unique task to be executed
|
|
91
|
+
* immediately.
|
|
92
|
+
* @param body Collection of documents to analyze and a single task to execute.
|
|
124
93
|
* @param options The options parameters.
|
|
125
94
|
*/
|
|
126
|
-
|
|
127
|
-
return this.sendOperationRequest({
|
|
95
|
+
analyze(body, options) {
|
|
96
|
+
return this.sendOperationRequest({ body, options }, analyzeOperationSpec);
|
|
128
97
|
}
|
|
129
98
|
}
|
|
130
99
|
// Operation Specifications
|
|
131
100
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
132
101
|
const analyzeOperationSpec = {
|
|
133
|
-
path: "
|
|
102
|
+
path: "/:analyze-text",
|
|
134
103
|
httpMethod: "POST",
|
|
135
|
-
responses: {
|
|
136
|
-
202: {
|
|
137
|
-
headersMapper: Mappers.GeneratedClientAnalyzeHeaders
|
|
138
|
-
},
|
|
139
|
-
default: {
|
|
140
|
-
bodyMapper: Mappers.ErrorResponse
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
requestBody: Parameters.body,
|
|
144
|
-
urlParameters: [Parameters.endpoint, Parameters.apiVersion],
|
|
145
|
-
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
146
|
-
mediaType: "json",
|
|
147
|
-
serializer
|
|
148
|
-
};
|
|
149
|
-
const analyzeStatusOperationSpec = {
|
|
150
|
-
path: "/analyze/jobs/{jobId}",
|
|
151
|
-
httpMethod: "GET",
|
|
152
|
-
responses: {
|
|
153
|
-
200: {
|
|
154
|
-
bodyMapper: Mappers.AnalyzeJobState
|
|
155
|
-
},
|
|
156
|
-
default: {
|
|
157
|
-
bodyMapper: Mappers.ErrorResponse
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
queryParameters: [
|
|
161
|
-
Parameters.includeStatistics,
|
|
162
|
-
Parameters.top,
|
|
163
|
-
Parameters.skip
|
|
164
|
-
],
|
|
165
|
-
urlParameters: [Parameters.endpoint, Parameters.apiVersion, Parameters.jobId],
|
|
166
|
-
headerParameters: [Parameters.accept],
|
|
167
|
-
serializer
|
|
168
|
-
};
|
|
169
|
-
const healthStatusOperationSpec = {
|
|
170
|
-
path: "/entities/health/jobs/{jobId}",
|
|
171
|
-
httpMethod: "GET",
|
|
172
104
|
responses: {
|
|
173
105
|
200: {
|
|
174
|
-
bodyMapper: Mappers.
|
|
106
|
+
bodyMapper: Mappers.AnalyzeTextTaskResult
|
|
175
107
|
},
|
|
176
108
|
default: {
|
|
177
109
|
bodyMapper: Mappers.ErrorResponse
|
|
178
110
|
}
|
|
179
111
|
},
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
Parameters.skip
|
|
184
|
-
],
|
|
185
|
-
urlParameters: [
|
|
186
|
-
Parameters.endpoint,
|
|
187
|
-
Parameters.apiVersion,
|
|
188
|
-
Parameters.jobId1
|
|
189
|
-
],
|
|
190
|
-
headerParameters: [Parameters.accept],
|
|
191
|
-
serializer
|
|
192
|
-
};
|
|
193
|
-
const cancelHealthJobOperationSpec = {
|
|
194
|
-
path: "/entities/health/jobs/{jobId}",
|
|
195
|
-
httpMethod: "DELETE",
|
|
196
|
-
responses: {
|
|
197
|
-
202: {
|
|
198
|
-
headersMapper: Mappers.GeneratedClientCancelHealthJobHeaders
|
|
199
|
-
},
|
|
200
|
-
default: {
|
|
201
|
-
bodyMapper: Mappers.ErrorResponse
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
urlParameters: [
|
|
205
|
-
Parameters.endpoint,
|
|
206
|
-
Parameters.apiVersion,
|
|
207
|
-
Parameters.jobId1
|
|
208
|
-
],
|
|
209
|
-
headerParameters: [Parameters.accept],
|
|
210
|
-
serializer
|
|
211
|
-
};
|
|
212
|
-
const healthOperationSpec = {
|
|
213
|
-
path: "/entities/health/jobs",
|
|
214
|
-
httpMethod: "POST",
|
|
215
|
-
responses: {
|
|
216
|
-
202: {
|
|
217
|
-
headersMapper: Mappers.GeneratedClientHealthHeaders
|
|
218
|
-
},
|
|
219
|
-
default: {
|
|
220
|
-
bodyMapper: Mappers.ErrorResponse
|
|
221
|
-
}
|
|
222
|
-
},
|
|
223
|
-
requestBody: Parameters.input,
|
|
224
|
-
queryParameters: [
|
|
225
|
-
Parameters.modelVersion,
|
|
226
|
-
Parameters.stringIndexType,
|
|
227
|
-
Parameters.loggingOptOut
|
|
228
|
-
],
|
|
229
|
-
urlParameters: [Parameters.endpoint, Parameters.apiVersion],
|
|
230
|
-
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
231
|
-
mediaType: "json",
|
|
232
|
-
serializer
|
|
233
|
-
};
|
|
234
|
-
const entitiesRecognitionGeneralOperationSpec = {
|
|
235
|
-
path: "/entities/recognition/general",
|
|
236
|
-
httpMethod: "POST",
|
|
237
|
-
responses: {
|
|
238
|
-
200: {
|
|
239
|
-
bodyMapper: Mappers.EntitiesResult
|
|
240
|
-
},
|
|
241
|
-
default: {
|
|
242
|
-
bodyMapper: Mappers.ErrorResponse
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
requestBody: Parameters.input,
|
|
246
|
-
queryParameters: [
|
|
247
|
-
Parameters.includeStatistics,
|
|
248
|
-
Parameters.modelVersion,
|
|
249
|
-
Parameters.stringIndexType,
|
|
250
|
-
Parameters.loggingOptOut
|
|
251
|
-
],
|
|
252
|
-
urlParameters: [Parameters.endpoint, Parameters.apiVersion],
|
|
253
|
-
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
254
|
-
mediaType: "json",
|
|
255
|
-
serializer
|
|
256
|
-
};
|
|
257
|
-
const entitiesRecognitionPiiOperationSpec = {
|
|
258
|
-
path: "/entities/recognition/pii",
|
|
259
|
-
httpMethod: "POST",
|
|
260
|
-
responses: {
|
|
261
|
-
200: {
|
|
262
|
-
bodyMapper: Mappers.PiiResult
|
|
263
|
-
},
|
|
264
|
-
default: {
|
|
265
|
-
bodyMapper: Mappers.ErrorResponse
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
requestBody: Parameters.input,
|
|
269
|
-
queryParameters: [
|
|
270
|
-
Parameters.includeStatistics,
|
|
271
|
-
Parameters.modelVersion,
|
|
272
|
-
Parameters.stringIndexType,
|
|
273
|
-
Parameters.loggingOptOut,
|
|
274
|
-
Parameters.domain,
|
|
275
|
-
Parameters.piiCategories
|
|
276
|
-
],
|
|
277
|
-
urlParameters: [Parameters.endpoint, Parameters.apiVersion],
|
|
278
|
-
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
279
|
-
mediaType: "json",
|
|
280
|
-
serializer
|
|
281
|
-
};
|
|
282
|
-
const entitiesLinkingOperationSpec = {
|
|
283
|
-
path: "/entities/linking",
|
|
284
|
-
httpMethod: "POST",
|
|
285
|
-
responses: {
|
|
286
|
-
200: {
|
|
287
|
-
bodyMapper: Mappers.EntityLinkingResult
|
|
288
|
-
},
|
|
289
|
-
default: {
|
|
290
|
-
bodyMapper: Mappers.ErrorResponse
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
requestBody: Parameters.input,
|
|
294
|
-
queryParameters: [
|
|
295
|
-
Parameters.includeStatistics,
|
|
296
|
-
Parameters.modelVersion,
|
|
297
|
-
Parameters.stringIndexType,
|
|
298
|
-
Parameters.loggingOptOut
|
|
299
|
-
],
|
|
300
|
-
urlParameters: [Parameters.endpoint, Parameters.apiVersion],
|
|
301
|
-
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
302
|
-
mediaType: "json",
|
|
303
|
-
serializer
|
|
304
|
-
};
|
|
305
|
-
const keyPhrasesOperationSpec = {
|
|
306
|
-
path: "/keyPhrases",
|
|
307
|
-
httpMethod: "POST",
|
|
308
|
-
responses: {
|
|
309
|
-
200: {
|
|
310
|
-
bodyMapper: Mappers.KeyPhraseResult
|
|
311
|
-
},
|
|
312
|
-
default: {
|
|
313
|
-
bodyMapper: Mappers.ErrorResponse
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
requestBody: Parameters.input,
|
|
317
|
-
queryParameters: [
|
|
318
|
-
Parameters.includeStatistics,
|
|
319
|
-
Parameters.modelVersion,
|
|
320
|
-
Parameters.loggingOptOut
|
|
321
|
-
],
|
|
322
|
-
urlParameters: [Parameters.endpoint, Parameters.apiVersion],
|
|
323
|
-
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
324
|
-
mediaType: "json",
|
|
325
|
-
serializer
|
|
326
|
-
};
|
|
327
|
-
const languagesOperationSpec = {
|
|
328
|
-
path: "/languages",
|
|
329
|
-
httpMethod: "POST",
|
|
330
|
-
responses: {
|
|
331
|
-
200: {
|
|
332
|
-
bodyMapper: Mappers.LanguageResult
|
|
333
|
-
},
|
|
334
|
-
default: {
|
|
335
|
-
bodyMapper: Mappers.ErrorResponse
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
requestBody: Parameters.input1,
|
|
339
|
-
queryParameters: [
|
|
340
|
-
Parameters.includeStatistics,
|
|
341
|
-
Parameters.modelVersion,
|
|
342
|
-
Parameters.loggingOptOut
|
|
343
|
-
],
|
|
344
|
-
urlParameters: [Parameters.endpoint, Parameters.apiVersion],
|
|
345
|
-
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
346
|
-
mediaType: "json",
|
|
347
|
-
serializer
|
|
348
|
-
};
|
|
349
|
-
const sentimentOperationSpec = {
|
|
350
|
-
path: "/sentiment",
|
|
351
|
-
httpMethod: "POST",
|
|
352
|
-
responses: {
|
|
353
|
-
200: {
|
|
354
|
-
bodyMapper: Mappers.SentimentResponse
|
|
355
|
-
},
|
|
356
|
-
default: {
|
|
357
|
-
bodyMapper: Mappers.ErrorResponse
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
requestBody: Parameters.input,
|
|
361
|
-
queryParameters: [
|
|
362
|
-
Parameters.includeStatistics,
|
|
363
|
-
Parameters.modelVersion,
|
|
364
|
-
Parameters.stringIndexType,
|
|
365
|
-
Parameters.loggingOptOut,
|
|
366
|
-
Parameters.opinionMining
|
|
367
|
-
],
|
|
368
|
-
urlParameters: [Parameters.endpoint, Parameters.apiVersion],
|
|
112
|
+
requestBody: Parameters.body,
|
|
113
|
+
queryParameters: [Parameters.apiVersion, Parameters.includeStatistics],
|
|
114
|
+
urlParameters: [Parameters.endpoint],
|
|
369
115
|
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
370
116
|
mediaType: "json",
|
|
371
117
|
serializer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatedClient.js","sourceRoot":"","sources":["../../../src/generated/generatedClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AA6BlE,gBAAgB;AAChB,MAAM,OAAO,eAAgB,SAAQ,sBAAsB;IACzD;;;;;OAKG;IACH,YAAY,QAAgB,EAAE,OAAuC;QACnE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,OAAO,CACL,OAA8C;QAE9C,OAAO,IAAI,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,oBAAoB,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CACX,KAAa,EACb,OAAoD;QAEpD,OAAO,IAAI,CAAC,oBAAoB,CAC9B,EAAE,KAAK,EAAE,OAAO,EAAE,EAClB,0BAA0B,CAC3B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,YAAY,CACV,K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corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as Parameters from \"./models/parameters\";\nimport * as Mappers from \"./models/mappers\";\nimport { GeneratedClientContext } from \"./generatedClientContext\";\nimport {\n GeneratedClientOptionalParams,\n GeneratedClientAnalyzeOptionalParams,\n GeneratedClientAnalyzeResponse,\n GeneratedClientAnalyzeStatusOptionalParams,\n GeneratedClientAnalyzeStatusResponse,\n GeneratedClientHealthStatusOptionalParams,\n GeneratedClientHealthStatusResponse,\n GeneratedClientCancelHealthJobOptionalParams,\n GeneratedClientCancelHealthJobResponse,\n MultiLanguageBatchInput,\n GeneratedClientHealthOptionalParams,\n GeneratedClientHealthResponse,\n GeneratedClientEntitiesRecognitionGeneralOptionalParams,\n GeneratedClientEntitiesRecognitionGeneralResponse,\n GeneratedClientEntitiesRecognitionPiiOptionalParams,\n GeneratedClientEntitiesRecognitionPiiResponse,\n GeneratedClientEntitiesLinkingOptionalParams,\n GeneratedClientEntitiesLinkingResponse,\n GeneratedClientKeyPhrasesOptionalParams,\n GeneratedClientKeyPhrasesResponse,\n LanguageBatchInput,\n GeneratedClientLanguagesOptionalParams,\n GeneratedClientLanguagesResponse,\n GeneratedClientSentimentOptionalParams,\n GeneratedClientSentimentResponse\n} from \"./models\";\n\n/** @internal */\nexport class GeneratedClient extends GeneratedClientContext {\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example:\n * https://westus.api.cognitive.microsoft.com).\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n super(endpoint, options);\n }\n\n /**\n * Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed.\n * @param options The options parameters.\n */\n analyze(\n options?: GeneratedClientAnalyzeOptionalParams\n ): Promise<GeneratedClientAnalyzeResponse> {\n return this.sendOperationRequest({ options }, analyzeOperationSpec);\n }\n\n /**\n * Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\n * completed, the job will transition to the completed state and results will be available for each\n * task.\n * @param jobId Job ID for Analyze\n * @param options The options parameters.\n */\n analyzeStatus(\n jobId: string,\n options?: GeneratedClientAnalyzeStatusOptionalParams\n ): Promise<GeneratedClientAnalyzeStatusResponse> {\n return this.sendOperationRequest(\n { jobId, options },\n analyzeStatusOperationSpec\n );\n }\n\n /**\n * Get details of the healthcare prediction job specified by the jobId.\n * @param jobId Job ID\n * @param options The options parameters.\n */\n healthStatus(\n jobId: string,\n options?: GeneratedClientHealthStatusOptionalParams\n ): Promise<GeneratedClientHealthStatusResponse> {\n return this.sendOperationRequest(\n { jobId, options },\n healthStatusOperationSpec\n );\n }\n\n /**\n * Cancel healthcare prediction job.\n * @param jobId Job ID\n * @param options The options parameters.\n */\n cancelHealthJob(\n jobId: string,\n options?: GeneratedClientCancelHealthJobOptionalParams\n ): Promise<GeneratedClientCancelHealthJobResponse> {\n return this.sendOperationRequest(\n { jobId, options },\n cancelHealthJobOperationSpec\n );\n }\n\n /**\n * Start a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\n * symptoms, etc) and their relations.\n * @param input Collection of documents to analyze.\n * @param options The options parameters.\n */\n health(\n input: MultiLanguageBatchInput,\n options?: GeneratedClientHealthOptionalParams\n ): Promise<GeneratedClientHealthResponse> {\n return this.sendOperationRequest({ input, options }, healthOperationSpec);\n }\n\n /**\n * The API returns a list of general named entities in a given document. For the list of supported\n * entity types, check <a href=\"https://aka.ms/taner\">Supported Entity Types in Text Analytics API</a>.\n * See the <a href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list\n * of enabled languages.\n * @param input Collection of documents to analyze.\n * @param options The options parameters.\n */\n entitiesRecognitionGeneral(\n input: MultiLanguageBatchInput,\n options?: GeneratedClientEntitiesRecognitionGeneralOptionalParams\n ): Promise<GeneratedClientEntitiesRecognitionGeneralResponse> {\n return this.sendOperationRequest(\n { input, options },\n entitiesRecognitionGeneralOperationSpec\n );\n }\n\n /**\n * The API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in the\n * document. For the list of supported entity types, check <a href=\"https://aka.ms/tanerpii\">Supported\n * Entity Types in Text Analytics API</a>. See the <a href=\"https://aka.ms/talangs\">Supported languages\n * in Text Analytics API</a> for the list of enabled languages.\n *\n * @param input Collection of documents to analyze.\n * @param options The options parameters.\n */\n entitiesRecognitionPii(\n input: MultiLanguageBatchInput,\n options?: GeneratedClientEntitiesRecognitionPiiOptionalParams\n ): Promise<GeneratedClientEntitiesRecognitionPiiResponse> {\n return this.sendOperationRequest(\n { input, options },\n entitiesRecognitionPiiOperationSpec\n );\n }\n\n /**\n * The API returns a list of recognized entities with links to a well known knowledge base. See the <a\n * href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled\n * languages.\n * @param input Collection of documents to analyze.\n * @param options The options parameters.\n */\n entitiesLinking(\n input: MultiLanguageBatchInput,\n options?: GeneratedClientEntitiesLinkingOptionalParams\n ): Promise<GeneratedClientEntitiesLinkingResponse> {\n return this.sendOperationRequest(\n { input, options },\n entitiesLinkingOperationSpec\n );\n }\n\n /**\n * The API returns a list of strings denoting the key phrases in the input text. See the <a\n * href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled\n * languages.\n * @param input Collection of documents to analyze.\n * @param options The options parameters.\n */\n keyPhrases(\n input: MultiLanguageBatchInput,\n options?: GeneratedClientKeyPhrasesOptionalParams\n ): Promise<GeneratedClientKeyPhrasesResponse> {\n return this.sendOperationRequest(\n { input, options },\n keyPhrasesOperationSpec\n );\n }\n\n /**\n * The API returns the detected language and a numeric score between 0 and 1. Scores close to 1\n * indicate 100% certainty that the identified language is true. See the <a\n * href=\"https://aka.ms/talangs\">Supported languages in Text Analytics API</a> for the list of enabled\n * languages.\n * @param input Collection of documents to analyze for language endpoint.\n * @param options The options parameters.\n */\n languages(\n input: LanguageBatchInput,\n options?: GeneratedClientLanguagesOptionalParams\n ): Promise<GeneratedClientLanguagesResponse> {\n return this.sendOperationRequest(\n { input, options },\n languagesOperationSpec\n );\n }\n\n /**\n * The API returns a detailed sentiment analysis for the input text. The analysis is done in multiple\n * levels of granularity, start from the a document level, down to sentence and key terms (targets and\n * assessments).\n * @param input Collection of documents to analyze.\n * @param options The options parameters.\n */\n sentiment(\n input: MultiLanguageBatchInput,\n options?: GeneratedClientSentimentOptionalParams\n ): Promise<GeneratedClientSentimentResponse> {\n return this.sendOperationRequest(\n { input, options },\n sentimentOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst analyzeOperationSpec: coreClient.OperationSpec = {\n path: \"/analyze\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.GeneratedClientAnalyzeHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body,\n urlParameters: [Parameters.endpoint, Parameters.apiVersion],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst analyzeStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/analyze/jobs/{jobId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AnalyzeJobState\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.includeStatistics,\n Parameters.top,\n Parameters.skip\n ],\n urlParameters: [Parameters.endpoint, Parameters.apiVersion, Parameters.jobId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst healthStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/entities/health/jobs/{jobId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.HealthcareJobState\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n queryParameters: [\n Parameters.includeStatistics,\n Parameters.top,\n Parameters.skip\n ],\n urlParameters: [\n Parameters.endpoint,\n Parameters.apiVersion,\n Parameters.jobId1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst cancelHealthJobOperationSpec: coreClient.OperationSpec = {\n path: \"/entities/health/jobs/{jobId}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {\n headersMapper: Mappers.GeneratedClientCancelHealthJobHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n urlParameters: [\n Parameters.endpoint,\n Parameters.apiVersion,\n Parameters.jobId1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst healthOperationSpec: coreClient.OperationSpec = {\n path: \"/entities/health/jobs\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n headersMapper: Mappers.GeneratedClientHealthHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.input,\n queryParameters: [\n Parameters.modelVersion,\n Parameters.stringIndexType,\n Parameters.loggingOptOut\n ],\n urlParameters: [Parameters.endpoint, Parameters.apiVersion],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst entitiesRecognitionGeneralOperationSpec: coreClient.OperationSpec = {\n path: \"/entities/recognition/general\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntitiesResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.input,\n queryParameters: [\n Parameters.includeStatistics,\n Parameters.modelVersion,\n Parameters.stringIndexType,\n Parameters.loggingOptOut\n ],\n urlParameters: [Parameters.endpoint, Parameters.apiVersion],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst entitiesRecognitionPiiOperationSpec: coreClient.OperationSpec = {\n path: \"/entities/recognition/pii\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.PiiResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.input,\n queryParameters: [\n Parameters.includeStatistics,\n Parameters.modelVersion,\n Parameters.stringIndexType,\n Parameters.loggingOptOut,\n Parameters.domain,\n Parameters.piiCategories\n ],\n urlParameters: [Parameters.endpoint, Parameters.apiVersion],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst entitiesLinkingOperationSpec: coreClient.OperationSpec = {\n path: \"/entities/linking\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EntityLinkingResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.input,\n queryParameters: [\n Parameters.includeStatistics,\n Parameters.modelVersion,\n Parameters.stringIndexType,\n Parameters.loggingOptOut\n ],\n urlParameters: [Parameters.endpoint, Parameters.apiVersion],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst keyPhrasesOperationSpec: coreClient.OperationSpec = {\n path: \"/keyPhrases\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.KeyPhraseResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.input,\n queryParameters: [\n Parameters.includeStatistics,\n Parameters.modelVersion,\n Parameters.loggingOptOut\n ],\n urlParameters: [Parameters.endpoint, Parameters.apiVersion],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst languagesOperationSpec: coreClient.OperationSpec = {\n path: \"/languages\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.LanguageResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.input1,\n queryParameters: [\n Parameters.includeStatistics,\n Parameters.modelVersion,\n Parameters.loggingOptOut\n ],\n urlParameters: [Parameters.endpoint, Parameters.apiVersion],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst sentimentOperationSpec: coreClient.OperationSpec = {\n path: \"/sentiment\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SentimentResponse\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.input,\n queryParameters: [\n Parameters.includeStatistics,\n Parameters.modelVersion,\n Parameters.stringIndexType,\n Parameters.loggingOptOut,\n Parameters.opinionMining\n ],\n urlParameters: [Parameters.endpoint, Parameters.apiVersion],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"generatedClient.js","sourceRoot":"","sources":["../../../src/generated/generatedClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAM9D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAQ5C,gBAAgB;AAChB,MAAM,OAAO,eAAgB,SAAQ,UAAU,CAAC,aAAa;IAI3D;;;;;OAKG;IACH,YAAY,QAAgB,EAAE,OAAuC;;QACnE,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAkC;YAC9C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBA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B,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,IAAI;IAC5B,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,iBAAiB,CAAC;IACtE,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport { AnalyzeTextImpl } from \"./operations\";\nimport { AnalyzeText } from \"./operationsInterfaces\";\nimport * as Parameters from \"./models/parameters\";\nimport * as Mappers from \"./models/mappers\";\nimport {\n GeneratedClientOptionalParams,\n AnalyzeActionUnion,\n AnalyzeOptionalParams,\n AnalyzeResponse\n} from \"./models\";\n\n/** @internal */\nexport class GeneratedClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClient class.\n * @param endpoint Supported Cognitive Services endpoint (e.g.,\n * https://<resource-name>.api.cognitiveservices.azure.com).\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: GeneratedClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: GeneratedClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-ai-text-analytics/6.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint ?? options.baseUri ?? \"{Endpoint}/language\"\n };\n super(optionsWithDefaults);\n\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n if (!bearerTokenAuthenticationPolicyFound) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n scopes: `${optionsWithDefaults.baseUri}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n }\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2022-04-01-preview\";\n this.analyzeText = new AnalyzeTextImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return item.replace(/(?<==).*$/, apiVersion);\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Submit a collection of text documents for analysis. Specify a single unique task to be executed\n * immediately.\n * @param body Collection of documents to analyze and a single task to execute.\n * @param options The options parameters.\n */\n analyze(\n body: AnalyzeActionUnion,\n options?: AnalyzeOptionalParams\n ): Promise<AnalyzeResponse> {\n return this.sendOperationRequest({ body, options }, analyzeOperationSpec);\n }\n\n analyzeText: AnalyzeText;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst analyzeOperationSpec: coreClient.OperationSpec = {\n path: \"/:analyze-text\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AnalyzeTextTaskResult\n },\n default: {\n bodyMapper: Mappers.ErrorResponse\n }\n },\n requestBody: Parameters.body,\n queryParameters: [Parameters.apiVersion, Parameters.includeStatistics],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/generated/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,wBAAwB,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./models\";\nexport { GeneratedClient } from \"./generatedClient\";\nexport * from \"./operationsInterfaces\";\n"]}
|