@azure/ai-text-analytics 5.1.1-alpha.20210716.1 → 5.1.1-alpha.20220901.1
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/LICENSE +1 -1
- package/README.md +14 -13
- package/dist/index.js +758 -367
- package/dist/index.js.map +1 -1
- package/dist-esm/src/analyzeActionsResult.js +9 -9
- package/dist-esm/src/analyzeActionsResult.js.map +1 -1
- package/dist-esm/src/analyzeHealthcareEntitiesResult.js +4 -4
- package/dist-esm/src/analyzeHealthcareEntitiesResult.js.map +1 -1
- package/dist-esm/src/analyzeSentimentResult.js +5 -5
- package/dist-esm/src/analyzeSentimentResult.js.map +1 -1
- package/dist-esm/src/analyzeSentimentResultArray.js +1 -1
- package/dist-esm/src/analyzeSentimentResultArray.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/detectLanguageResult.js +1 -1
- package/dist-esm/src/detectLanguageResult.js.map +1 -1
- package/dist-esm/src/detectLanguageResultArray.js +1 -1
- package/dist-esm/src/detectLanguageResultArray.js.map +1 -1
- package/dist-esm/src/extractKeyPhrasesResult.js +1 -1
- package/dist-esm/src/extractKeyPhrasesResult.js.map +1 -1
- package/dist-esm/src/extractKeyPhrasesResultArray.js +1 -1
- package/dist-esm/src/extractKeyPhrasesResultArray.js.map +1 -1
- package/dist-esm/src/generated/generatedClient.js +41 -3
- package/dist-esm/src/generated/generatedClient.js.map +1 -1
- package/dist-esm/src/generated/index.js +0 -1
- package/dist-esm/src/generated/index.js.map +1 -1
- package/dist-esm/src/generated/models/index.js +514 -1
- package/dist-esm/src/generated/models/index.js.map +1 -1
- package/dist-esm/src/generated/models/mappers.js +5 -0
- package/dist-esm/src/generated/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/models/parameters.js +1 -0
- package/dist-esm/src/generated/models/parameters.js.map +1 -1
- package/dist-esm/src/index.js +3 -3
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/lro/analyze/operation.js +29 -71
- package/dist-esm/src/lro/analyze/operation.js.map +1 -1
- package/dist-esm/src/lro/analyze/poller.js +3 -3
- package/dist-esm/src/lro/analyze/poller.js.map +1 -1
- package/dist-esm/src/lro/health/operation.js +41 -82
- package/dist-esm/src/lro/health/operation.js.map +1 -1
- package/dist-esm/src/lro/health/poller.js +3 -3
- package/dist-esm/src/lro/health/poller.js.map +1 -1
- package/dist-esm/src/lro/poller.js +1 -1
- package/dist-esm/src/lro/poller.js.map +1 -1
- package/dist-esm/src/recognizeCategorizedEntitiesResult.js +1 -1
- package/dist-esm/src/recognizeCategorizedEntitiesResult.js.map +1 -1
- package/dist-esm/src/recognizeCategorizedEntitiesResultArray.js +1 -1
- package/dist-esm/src/recognizeCategorizedEntitiesResultArray.js.map +1 -1
- package/dist-esm/src/recognizeLinkedEntitiesResult.js +1 -1
- package/dist-esm/src/recognizeLinkedEntitiesResult.js.map +1 -1
- package/dist-esm/src/recognizeLinkedEntitiesResultArray.js +1 -1
- package/dist-esm/src/recognizeLinkedEntitiesResultArray.js.map +1 -1
- package/dist-esm/src/recognizePiiEntitiesResult.js +1 -1
- package/dist-esm/src/recognizePiiEntitiesResult.js.map +1 -1
- package/dist-esm/src/recognizePiiEntitiesResultArray.js +1 -1
- package/dist-esm/src/recognizePiiEntitiesResultArray.js.map +1 -1
- package/dist-esm/src/textAnalyticsClient.js +58 -149
- package/dist-esm/src/textAnalyticsClient.js.map +1 -1
- package/dist-esm/src/textAnalyticsResult.js +4 -14
- package/dist-esm/src/textAnalyticsResult.js.map +1 -1
- package/dist-esm/src/util.js +44 -29
- package/dist-esm/src/util.js.map +1 -1
- package/package.json +34 -36
- package/types/ai-text-analytics.d.ts +133 -32
- package/CHANGELOG.md +0 -144
- package/dist-esm/src/generated/generatedClientContext.js +0 -42
- package/dist-esm/src/generated/generatedClientContext.js.map +0 -1
- package/dist-esm/src/tracing.js +0 -12
- package/dist-esm/src/tracing.js.map +0 -1
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sdk-type": "client",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "An isomorphic client library for the Azure Text Analytics service.",
|
|
6
|
-
"version": "5.1.1-alpha.
|
|
6
|
+
"version": "5.1.1-alpha.20220901.1",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"node",
|
|
9
9
|
"azure",
|
|
@@ -32,11 +32,15 @@
|
|
|
32
32
|
"constantPaths": [
|
|
33
33
|
{
|
|
34
34
|
"path": "src/generated/generatedClientContext.ts",
|
|
35
|
-
"prefix": "
|
|
35
|
+
"prefix": "packageDetails"
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"path": "src/constants.ts",
|
|
39
39
|
"prefix": "SDK_VERSION"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"path": "swagger/README.md",
|
|
43
|
+
"prefix": "package-version"
|
|
40
44
|
}
|
|
41
45
|
]
|
|
42
46
|
},
|
|
@@ -60,53 +64,51 @@
|
|
|
60
64
|
},
|
|
61
65
|
"scripts": {
|
|
62
66
|
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
|
|
63
|
-
"build:browser": "tsc -p . &&
|
|
64
|
-
"build:node": "tsc -p . &&
|
|
67
|
+
"build:browser": "tsc -p . && dev-tool run bundle",
|
|
68
|
+
"build:node": "tsc -p . && dev-tool run bundle",
|
|
65
69
|
"build:samples": "echo Obsolete.",
|
|
66
|
-
"build:test": "tsc -p . &&
|
|
67
|
-
"build": "tsc -p . &&
|
|
68
|
-
"build:debug": "tsc -p . &&
|
|
70
|
+
"build:test": "tsc -p . && dev-tool run bundle",
|
|
71
|
+
"build": "npm run clean && tsc -p . && dev-tool run bundle && api-extractor run --local",
|
|
72
|
+
"build:debug": "tsc -p . && dev-tool run bundle && api-extractor run --local",
|
|
69
73
|
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
70
74
|
"clean": "rimraf dist dist-* temp types *.tgz *.log",
|
|
71
75
|
"execute:samples": "dev-tool samples run samples-dev",
|
|
72
76
|
"extract-api": "tsc -p . && api-extractor run --local",
|
|
73
77
|
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
74
|
-
"integration-test:browser": "
|
|
75
|
-
"integration-test:node": "
|
|
78
|
+
"integration-test:browser": "dev-tool run test:browser",
|
|
79
|
+
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 \"dist-esm/test/**/*.spec.js\"",
|
|
76
80
|
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
|
|
77
81
|
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
|
|
78
82
|
"lint": "eslint package.json api-extractor.json src test --ext .ts",
|
|
79
83
|
"pack": "npm pack 2>&1",
|
|
80
|
-
"prebuild": "npm run clean",
|
|
81
84
|
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
|
|
82
85
|
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
|
|
83
86
|
"test": "npm run clean && npm run build:test && npm run unit-test",
|
|
84
|
-
"unit-test:browser": "
|
|
85
|
-
"unit-test:node": "
|
|
86
|
-
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
|
|
87
|
-
"docs": "typedoc --excludePrivate --excludeNotExported --excludeExternals --stripInternal --mode file --out ./dist/docs ./src"
|
|
87
|
+
"unit-test:browser": "dev-tool run test:browser",
|
|
88
|
+
"unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 \"test/**/*.spec.ts\"",
|
|
89
|
+
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
|
|
88
90
|
},
|
|
89
91
|
"sideEffects": false,
|
|
90
92
|
"autoPublish": false,
|
|
91
93
|
"dependencies": {
|
|
92
|
-
"@azure/abort-controller": "^1.
|
|
93
|
-
"@azure/core-asynciterator-polyfill": "^1.0.0",
|
|
94
|
+
"@azure/abort-controller": "^1.1.0",
|
|
94
95
|
"@azure/core-auth": "^1.3.0",
|
|
95
96
|
"@azure/core-client": "^1.0.0",
|
|
96
|
-
"@azure/core-rest-pipeline": "^1.1
|
|
97
|
-
"@azure/core-lro": "^2.
|
|
98
|
-
"@azure/core-paging": "^1.
|
|
99
|
-
"@azure/core-tracing": "1.0.0
|
|
97
|
+
"@azure/core-rest-pipeline": "^1.8.1",
|
|
98
|
+
"@azure/core-lro": "^2.2.0",
|
|
99
|
+
"@azure/core-paging": "^1.3.0",
|
|
100
|
+
"@azure/core-tracing": "^1.0.0",
|
|
100
101
|
"@azure/logger": "^1.0.0",
|
|
101
102
|
"tslib": "^2.2.0"
|
|
102
103
|
},
|
|
103
104
|
"devDependencies": {
|
|
104
|
-
"@azure/dev-tool": "
|
|
105
|
-
"@azure/eslint-plugin-azure-sdk": "
|
|
106
|
-
"@azure/identity": "2.0.
|
|
107
|
-
"@azure/test-utils": "
|
|
108
|
-
"@azure/test-
|
|
109
|
-
"@
|
|
105
|
+
"@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
|
|
106
|
+
"@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
|
|
107
|
+
"@azure/identity": "^2.0.1",
|
|
108
|
+
"@azure/test-utils": ">=1.0.0-alpha <1.0.0-alphb",
|
|
109
|
+
"@azure-tools/test-recorder": "^2.0.0",
|
|
110
|
+
"@azure-tools/test-credential": ">=1.0.0-alpha <1.0.0-alphb",
|
|
111
|
+
"@microsoft/api-extractor": "7.18.11",
|
|
110
112
|
"@types/chai": "^4.1.6",
|
|
111
113
|
"@types/chai-as-promised": "^7.1.0",
|
|
112
114
|
"@types/mocha": "^7.0.2",
|
|
@@ -116,7 +118,7 @@
|
|
|
116
118
|
"chai-as-promised": "^7.1.1",
|
|
117
119
|
"cross-env": "^7.0.2",
|
|
118
120
|
"dotenv": "^8.2.0",
|
|
119
|
-
"eslint": "^
|
|
121
|
+
"eslint": "^8.0.0",
|
|
120
122
|
"karma": "^6.2.0",
|
|
121
123
|
"karma-chrome-launcher": "^3.0.0",
|
|
122
124
|
"karma-coverage": "^2.0.0",
|
|
@@ -124,23 +126,19 @@
|
|
|
124
126
|
"karma-env-preprocessor": "^0.1.1",
|
|
125
127
|
"karma-firefox-launcher": "^1.1.0",
|
|
126
128
|
"karma-ie-launcher": "^1.0.0",
|
|
127
|
-
"karma-json-preprocessor": "^0.3.3",
|
|
128
|
-
"karma-json-to-file-reporter": "^1.0.1",
|
|
129
129
|
"karma-junit-reporter": "^2.0.1",
|
|
130
130
|
"karma-mocha": "^2.0.1",
|
|
131
131
|
"karma-mocha-reporter": "^2.2.5",
|
|
132
132
|
"karma-sourcemap-loader": "^0.3.8",
|
|
133
133
|
"karma-source-map-support": "~1.4.0",
|
|
134
134
|
"mocha": "^7.1.1",
|
|
135
|
-
"mocha-junit-reporter": "^
|
|
136
|
-
"nyc": "^
|
|
137
|
-
"prettier": "^
|
|
135
|
+
"mocha-junit-reporter": "^2.0.0",
|
|
136
|
+
"nyc": "^15.0.0",
|
|
137
|
+
"prettier": "^2.5.1",
|
|
138
138
|
"rimraf": "^3.0.0",
|
|
139
|
-
"rollup": "^1.16.3",
|
|
140
139
|
"sinon": "^9.0.2",
|
|
141
140
|
"source-map-support": "^0.5.9",
|
|
142
|
-
"ts-node": "^
|
|
143
|
-
"typescript": "~4.
|
|
144
|
-
"typedoc": "0.15.2"
|
|
141
|
+
"ts-node": "^10.0.0",
|
|
142
|
+
"typescript": "~4.6.0"
|
|
145
143
|
}
|
|
146
144
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { AbortSignalLike } from '@azure/abort-controller';
|
|
1
2
|
import { AzureKeyCredential } from '@azure/core-auth';
|
|
3
|
+
import { CancelOnProgress } from '@azure/core-lro';
|
|
2
4
|
import { CommonClientOptions } from '@azure/core-client';
|
|
3
5
|
import { KeyCredential } from '@azure/core-auth';
|
|
4
6
|
import { OperationOptions } from '@azure/core-client';
|
|
@@ -80,7 +82,7 @@ export declare type AnalyzeHealthcareEntitiesErrorResult = TextAnalyticsErrorRes
|
|
|
80
82
|
/**
|
|
81
83
|
* Result type of the Health Long-Running-Operation (LRO)
|
|
82
84
|
*/
|
|
83
|
-
export declare type AnalyzeHealthcareEntitiesPollerLike =
|
|
85
|
+
export declare type AnalyzeHealthcareEntitiesPollerLike = PollerLikeWithCancellation<AnalyzeHealthcareOperationState, PagedAnalyzeHealthcareEntitiesResult>;
|
|
84
86
|
|
|
85
87
|
/**
|
|
86
88
|
* The result of the healthcare operation on a single document.
|
|
@@ -236,6 +238,7 @@ export declare interface AnalyzeSentimentSuccessResult extends TextAnalyticsSucc
|
|
|
236
238
|
*/
|
|
237
239
|
export declare interface AssessmentSentiment extends SentenceAssessment {
|
|
238
240
|
}
|
|
241
|
+
|
|
239
242
|
export { AzureKeyCredential }
|
|
240
243
|
|
|
241
244
|
/**
|
|
@@ -665,51 +668,88 @@ export declare type HealthcareEntityRelationType = string;
|
|
|
665
668
|
export declare type InnerErrorCodeValue = string;
|
|
666
669
|
|
|
667
670
|
/** Known values of {@link HealthcareEntityCategory} that the service accepts. */
|
|
668
|
-
export declare
|
|
671
|
+
export declare enum KnownHealthcareEntityCategory {
|
|
672
|
+
/** BodyStructure */
|
|
669
673
|
BodyStructure = "BODY_STRUCTURE",
|
|
674
|
+
/** AGE */
|
|
670
675
|
AGE = "AGE",
|
|
676
|
+
/** Gender */
|
|
671
677
|
Gender = "GENDER",
|
|
678
|
+
/** ExaminationName */
|
|
672
679
|
ExaminationName = "EXAMINATION_NAME",
|
|
680
|
+
/** Date */
|
|
673
681
|
Date = "DATE",
|
|
682
|
+
/** Direction */
|
|
674
683
|
Direction = "DIRECTION",
|
|
684
|
+
/** Frequency */
|
|
675
685
|
Frequency = "FREQUENCY",
|
|
686
|
+
/** MeasurementValue */
|
|
676
687
|
MeasurementValue = "MEASUREMENT_VALUE",
|
|
688
|
+
/** MeasurementUnit */
|
|
677
689
|
MeasurementUnit = "MEASUREMENT_UNIT",
|
|
690
|
+
/** RelationalOperator */
|
|
678
691
|
RelationalOperator = "RELATIONAL_OPERATOR",
|
|
692
|
+
/** Time */
|
|
679
693
|
Time = "TIME",
|
|
694
|
+
/** GeneORProtein */
|
|
680
695
|
GeneORProtein = "GENE_OR_PROTEIN",
|
|
696
|
+
/** Variant */
|
|
681
697
|
Variant = "VARIANT",
|
|
698
|
+
/** AdministrativeEvent */
|
|
682
699
|
AdministrativeEvent = "ADMINISTRATIVE_EVENT",
|
|
700
|
+
/** CareEnvironment */
|
|
683
701
|
CareEnvironment = "CARE_ENVIRONMENT",
|
|
702
|
+
/** HealthcareProfession */
|
|
684
703
|
HealthcareProfession = "HEALTHCARE_PROFESSION",
|
|
704
|
+
/** Diagnosis */
|
|
685
705
|
Diagnosis = "DIAGNOSIS",
|
|
706
|
+
/** SymptomORSign */
|
|
686
707
|
SymptomORSign = "SYMPTOM_OR_SIGN",
|
|
708
|
+
/** ConditionQualifier */
|
|
687
709
|
ConditionQualifier = "CONDITION_QUALIFIER",
|
|
710
|
+
/** MedicationClass */
|
|
688
711
|
MedicationClass = "MEDICATION_CLASS",
|
|
712
|
+
/** MedicationName */
|
|
689
713
|
MedicationName = "MEDICATION_NAME",
|
|
714
|
+
/** Dosage */
|
|
690
715
|
Dosage = "DOSAGE",
|
|
716
|
+
/** MedicationForm */
|
|
691
717
|
MedicationForm = "MEDICATION_FORM",
|
|
718
|
+
/** MedicationRoute */
|
|
692
719
|
MedicationRoute = "MEDICATION_ROUTE",
|
|
720
|
+
/** FamilyRelation */
|
|
693
721
|
FamilyRelation = "FAMILY_RELATION",
|
|
722
|
+
/** TreatmentName */
|
|
694
723
|
TreatmentName = "TREATMENT_NAME"
|
|
695
724
|
}
|
|
696
725
|
|
|
697
726
|
/** Known values of {@link InnerErrorCodeValue} that the service accepts. */
|
|
698
|
-
export declare
|
|
727
|
+
export declare enum KnownInnerErrorCodeValue {
|
|
728
|
+
/** InvalidParameterValue */
|
|
699
729
|
InvalidParameterValue = "InvalidParameterValue",
|
|
730
|
+
/** InvalidRequestBodyFormat */
|
|
700
731
|
InvalidRequestBodyFormat = "InvalidRequestBodyFormat",
|
|
732
|
+
/** EmptyRequest */
|
|
701
733
|
EmptyRequest = "EmptyRequest",
|
|
734
|
+
/** MissingInputRecords */
|
|
702
735
|
MissingInputRecords = "MissingInputRecords",
|
|
736
|
+
/** InvalidDocument */
|
|
703
737
|
InvalidDocument = "InvalidDocument",
|
|
738
|
+
/** ModelVersionIncorrect */
|
|
704
739
|
ModelVersionIncorrect = "ModelVersionIncorrect",
|
|
740
|
+
/** InvalidDocumentBatch */
|
|
705
741
|
InvalidDocumentBatch = "InvalidDocumentBatch",
|
|
742
|
+
/** UnsupportedLanguageCode */
|
|
706
743
|
UnsupportedLanguageCode = "UnsupportedLanguageCode",
|
|
744
|
+
/** InvalidCountryHint */
|
|
707
745
|
InvalidCountryHint = "InvalidCountryHint"
|
|
708
746
|
}
|
|
709
747
|
|
|
710
748
|
/** Known values of {@link WarningCode} that the service accepts. */
|
|
711
|
-
export declare
|
|
749
|
+
export declare enum KnownWarningCode {
|
|
750
|
+
/** LongWordsInDocument */
|
|
712
751
|
LongWordsInDocument = "LongWordsInDocument",
|
|
752
|
+
/** DocumentTruncated */
|
|
713
753
|
DocumentTruncated = "DocumentTruncated"
|
|
714
754
|
}
|
|
715
755
|
|
|
@@ -1022,6 +1062,66 @@ export declare enum PiiEntityDomain {
|
|
|
1022
1062
|
PROTECTED_HEALTH_INFORMATION = "PHI"
|
|
1023
1063
|
}
|
|
1024
1064
|
|
|
1065
|
+
/**
|
|
1066
|
+
* Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with.
|
|
1067
|
+
*/
|
|
1068
|
+
export declare interface PollerLikeWithCancellation<TState extends PollOperationState<TResult>, TResult> {
|
|
1069
|
+
/**
|
|
1070
|
+
* Returns a promise that will resolve once a single polling request finishes.
|
|
1071
|
+
* It does this by calling the update method of the Poller's operation.
|
|
1072
|
+
*/
|
|
1073
|
+
poll(options?: {
|
|
1074
|
+
abortSignal?: AbortSignalLike;
|
|
1075
|
+
}): Promise<void>;
|
|
1076
|
+
/**
|
|
1077
|
+
* Returns a promise that will resolve once the underlying operation is completed.
|
|
1078
|
+
*/
|
|
1079
|
+
pollUntilDone(): Promise<TResult>;
|
|
1080
|
+
/**
|
|
1081
|
+
* Invokes the provided callback after each polling is completed,
|
|
1082
|
+
* sending the current state of the poller's operation.
|
|
1083
|
+
*
|
|
1084
|
+
* It returns a method that can be used to stop receiving updates on the given callback function.
|
|
1085
|
+
*/
|
|
1086
|
+
onProgress(callback: (state: TState) => void): CancelOnProgress;
|
|
1087
|
+
/**
|
|
1088
|
+
* Returns true if the poller has finished polling.
|
|
1089
|
+
*/
|
|
1090
|
+
isDone(): boolean;
|
|
1091
|
+
/**
|
|
1092
|
+
* Stops the poller. After this, no manual or automated requests can be sent.
|
|
1093
|
+
*/
|
|
1094
|
+
stopPolling(): void;
|
|
1095
|
+
/**
|
|
1096
|
+
* Returns true if the poller is stopped.
|
|
1097
|
+
*/
|
|
1098
|
+
isStopped(): boolean;
|
|
1099
|
+
/**
|
|
1100
|
+
* Attempts to cancel the underlying operation.
|
|
1101
|
+
*/
|
|
1102
|
+
cancelOperation(options?: {
|
|
1103
|
+
abortSignal?: AbortSignalLike;
|
|
1104
|
+
}): Promise<void>;
|
|
1105
|
+
/**
|
|
1106
|
+
* Returns the state of the operation.
|
|
1107
|
+
* The TState defined in PollerLike can be a subset of the TState defined in
|
|
1108
|
+
* the Poller implementation.
|
|
1109
|
+
*/
|
|
1110
|
+
getOperationState(): TState;
|
|
1111
|
+
/**
|
|
1112
|
+
* Returns the result value of the operation,
|
|
1113
|
+
* regardless of the state of the poller.
|
|
1114
|
+
* It can return undefined or an incomplete form of the final TResult value
|
|
1115
|
+
* depending on the implementation.
|
|
1116
|
+
*/
|
|
1117
|
+
getResult(): TResult | undefined;
|
|
1118
|
+
/**
|
|
1119
|
+
* Returns a serialized version of the poller's operation
|
|
1120
|
+
* by invoking the operation's toString method.
|
|
1121
|
+
*/
|
|
1122
|
+
toString(): string;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1025
1125
|
/**
|
|
1026
1126
|
* Options for an entities recognition action.
|
|
1027
1127
|
*/
|
|
@@ -1499,6 +1599,7 @@ export declare class TextAnalyticsClient {
|
|
|
1499
1599
|
*/
|
|
1500
1600
|
defaultLanguage: string;
|
|
1501
1601
|
/* Excluded from this release type: client */
|
|
1602
|
+
private readonly _tracing;
|
|
1502
1603
|
/**
|
|
1503
1604
|
* Creates an instance of TextAnalyticsClient.
|
|
1504
1605
|
*
|
|
@@ -1553,10 +1654,10 @@ export declare class TextAnalyticsClient {
|
|
|
1553
1654
|
* {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}.
|
|
1554
1655
|
* @param documents - The input strings to analyze.
|
|
1555
1656
|
* @param language - The language that all the input strings are
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1657
|
+
written in. If unspecified, this value will be set to the default
|
|
1658
|
+
language in `TextAnalyticsClientOptions`.
|
|
1659
|
+
If set to an empty string, the service will apply a model
|
|
1660
|
+
where the language is explicitly set to "None".
|
|
1560
1661
|
* @param options - Optional parameters for the operation.
|
|
1561
1662
|
*/
|
|
1562
1663
|
recognizeEntities(documents: string[], language?: string, options?: RecognizeCategorizedEntitiesOptions): Promise<RecognizeCategorizedEntitiesResultArray>;
|
|
@@ -1581,10 +1682,10 @@ export declare class TextAnalyticsClient {
|
|
|
1581
1682
|
* {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}.
|
|
1582
1683
|
* @param documents - The input strings to analyze.
|
|
1583
1684
|
* @param language - The language that all the input strings are
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1685
|
+
written in. If unspecified, this value will be set to the default
|
|
1686
|
+
language in `TextAnalyticsClientOptions`.
|
|
1687
|
+
If set to an empty string, the service will apply a model
|
|
1688
|
+
where the lanuage is explicitly set to "None".
|
|
1588
1689
|
* @param options - Optional parameters that includes enabling opinion mining.
|
|
1589
1690
|
*/
|
|
1590
1691
|
analyzeSentiment(documents: string[], language?: string, options?: AnalyzeSentimentOptions): Promise<AnalyzeSentimentResultArray>;
|
|
@@ -1606,10 +1707,10 @@ export declare class TextAnalyticsClient {
|
|
|
1606
1707
|
* {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}.
|
|
1607
1708
|
* @param documents - The input strings to analyze.
|
|
1608
1709
|
* @param language - The language that all the input strings are
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1710
|
+
written in. If unspecified, this value will be set to the default
|
|
1711
|
+
language in `TextAnalyticsClientOptions`.
|
|
1712
|
+
If set to an empty string, the service will apply a model
|
|
1713
|
+
where the language is explicitly set to "None".
|
|
1613
1714
|
* @param options - Options for the operation.
|
|
1614
1715
|
*/
|
|
1615
1716
|
extractKeyPhrases(documents: string[], language?: string, options?: ExtractKeyPhrasesOptions): Promise<ExtractKeyPhrasesResultArray>;
|
|
@@ -1631,10 +1732,10 @@ export declare class TextAnalyticsClient {
|
|
|
1631
1732
|
* {@link https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/language-support}.
|
|
1632
1733
|
* @param inputs - The input strings to analyze.
|
|
1633
1734
|
* @param language - The language that all the input strings are
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1735
|
+
written in. If unspecified, this value will be set to the default
|
|
1736
|
+
language in `TextAnalyticsClientOptions`.
|
|
1737
|
+
If set to an empty string, the service will apply a model
|
|
1738
|
+
where the language is explicitly set to "None".
|
|
1638
1739
|
* @param options - Options for the operation.
|
|
1639
1740
|
*/
|
|
1640
1741
|
recognizePiiEntities(inputs: string[], language?: string, options?: RecognizePiiEntitiesOptions): Promise<RecognizePiiEntitiesResultArray>;
|
|
@@ -1657,10 +1758,10 @@ export declare class TextAnalyticsClient {
|
|
|
1657
1758
|
* {@link https://docs.microsoft.com/azure/cognitive-services/text-analytics/language-support}.
|
|
1658
1759
|
* @param documents - The input strings to analyze.
|
|
1659
1760
|
* @param language - The language that all the input strings are
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1761
|
+
written in. If unspecified, this value will be set to the default
|
|
1762
|
+
language in `TextAnalyticsClientOptions`.
|
|
1763
|
+
If set to an empty string, the service will apply a model
|
|
1764
|
+
where the language is explicitly set to "None".
|
|
1664
1765
|
* @param options - Options for the operation.
|
|
1665
1766
|
*/
|
|
1666
1767
|
recognizeLinkedEntities(documents: string[], language?: string, options?: RecognizeLinkedEntitiesOptions): Promise<RecognizeLinkedEntitiesResultArray>;
|
|
@@ -1679,10 +1780,10 @@ export declare class TextAnalyticsClient {
|
|
|
1679
1780
|
* symptoms, etc) and their relations.
|
|
1680
1781
|
* @param documents - Collection of documents to analyze.
|
|
1681
1782
|
* @param language - The language that all the input strings are
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1783
|
+
written in. If unspecified, this value will be set to the default
|
|
1784
|
+
language in `TextAnalyticsClientOptions`.
|
|
1785
|
+
If set to an empty string, the service will apply a model
|
|
1786
|
+
where the language is explicitly set to "None".
|
|
1686
1787
|
* @param options - Options for the operation.
|
|
1687
1788
|
*/
|
|
1688
1789
|
beginAnalyzeHealthcareEntities(documents: string[], language?: string, options?: BeginAnalyzeHealthcareEntitiesOptions): Promise<AnalyzeHealthcareEntitiesPollerLike>;
|
|
@@ -1698,10 +1799,10 @@ export declare class TextAnalyticsClient {
|
|
|
1698
1799
|
* @param documents - Collection of documents to analyze
|
|
1699
1800
|
* @param actions - TextAnalyticsActions to execute.
|
|
1700
1801
|
* @param language - The language that all the input strings are
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1802
|
+
written in. If unspecified, this value will be set to the default
|
|
1803
|
+
language in `TextAnalyticsClientOptions`.
|
|
1804
|
+
If set to an empty string, the service will apply a model
|
|
1805
|
+
where the language is explicitly set to "None".
|
|
1705
1806
|
* @param options - Options for the operation.
|
|
1706
1807
|
*/
|
|
1707
1808
|
beginAnalyzeActions(documents: string[], actions: TextAnalyticsActions, language?: string, options?: BeginAnalyzeActionsOptions): Promise<AnalyzeActionsPollerLike>;
|
package/CHANGELOG.md
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
# Release History
|
|
2
|
-
|
|
3
|
-
## 5.1.1 (Unreleased)
|
|
4
|
-
|
|
5
|
-
### Features Added
|
|
6
|
-
|
|
7
|
-
### Breaking Changes
|
|
8
|
-
|
|
9
|
-
### Bugs Fixed
|
|
10
|
-
|
|
11
|
-
### Other Changes
|
|
12
|
-
|
|
13
|
-
## 5.1.0 (2021-07-07)
|
|
14
|
-
|
|
15
|
-
### New Features
|
|
16
|
-
|
|
17
|
-
- We are now targeting the service's v3.1 API as the default instead of v3.1-preview.5.
|
|
18
|
-
- `beginAnalyzeHealthcareEntities` now works with Azure Active Directory credentials.
|
|
19
|
-
- `categoriesFilter` support was added to `RecognizePiiEntitiesAction`.
|
|
20
|
-
|
|
21
|
-
### Breaking Changes
|
|
22
|
-
|
|
23
|
-
- `PiiEntityDomainType` was renamed to `PiiEntityDomain`.
|
|
24
|
-
- `domain` property of `RecognizePiiEntitiesAction` was renamed to `domainFilter`.
|
|
25
|
-
- `beginAnalyzeActions` is now limited to accept up to one action only per type.
|
|
26
|
-
|
|
27
|
-
## 5.1.0-beta.6 (2021-05-18)
|
|
28
|
-
|
|
29
|
-
### New Features
|
|
30
|
-
|
|
31
|
-
- With the dropping of support for Node.js versions that are no longer in LTS, the dependency on `@types/node` has been updated to version 12. Read our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
|
32
|
-
- We are now targeting the service's v3.1-preview.5 API as the default instead of v3.1-preview.4.
|
|
33
|
-
- `beginAnalyzeActions` adds support for analyze sentiment actions.
|
|
34
|
-
- `disableServiceLogs` parameter is added to most actions in `beginAnalyzeActions` that controls service-side logging.
|
|
35
|
-
|
|
36
|
-
### Breaking Changes
|
|
37
|
-
|
|
38
|
-
- `beginAnalyzeBatchActions` was renamed to `beginAnalyzeActions`.
|
|
39
|
-
- `TextElements_v8` is renamed to `TextElement_v8` in model `StringIndexType`.
|
|
40
|
-
|
|
41
|
-
### Key Bug Fixes
|
|
42
|
-
|
|
43
|
-
- Results of entity linking actions were not returned correctly by `beginAnalyzeActions` and that is now fixed.
|
|
44
|
-
|
|
45
|
-
## 5.1.0-beta.5 (2021-03-11)
|
|
46
|
-
|
|
47
|
-
- We are now targeting the service's v3.1-preview.4 API as the default instead of v3.1-preview.3.
|
|
48
|
-
- [Breaking] Aspects in opinions mining are now called targets and each individual opinion is now called an assessment. The new naming simplifies the naming of different parts of the response.
|
|
49
|
-
- `beginAnalyzeBatchActions` can now process recognize linked entities actions.
|
|
50
|
-
- `beginAnalyzeHealthcareEntities` returns `entityRelations` per document, a list of relations between healthcare entities.
|
|
51
|
-
- `beginAnalyzeHealthcareEntities` entities now include `assertions` instead of `isNegated` which gives more context about the respective entity.
|
|
52
|
-
- [Breaking] `beginAnalyzeHealthcareEntities` no longer returns `relatedEntities`.
|
|
53
|
-
- `recognizePiiEntities` takes a new option, `categoriesFilter`, that specifies a list of Pii categories to return.
|
|
54
|
-
- [Breaking] `statistics` is no longer part of `PagedAnalyzeBatchActionsResult`.
|
|
55
|
-
|
|
56
|
-
## 5.1.0-beta.4 (2021-02-10)
|
|
57
|
-
|
|
58
|
-
- [Breaking] `beginAnalyzeHealthcare` is renamed to `beginAnalyzeHealthcareEntities`.
|
|
59
|
-
- [Breaking] `beginAnalyze` is renamed to `beginAnalyzeBatchActions`.
|
|
60
|
-
- A new option to control how the offset is calculated by the service, `stringIndexType`, is added to `analyzeSentiment`, `recognizeEntities`, `recognizePiiEntities`, and `beginAnalyzeHealthcareEntities`. Furthermore, `stringIndexType` is added to task types `RecognizeEntitiesAction` and `RecognizePiiEntitiesAction`, which are the types of input actions to the `beginAnalyzeBatchActions` method. For more information, see [the Text Analytics documentation](https://docs.microsoft.com/azure/cognitive-services/text-analytics/concepts/text-offsets#offsets-in-api-version-31-preview).
|
|
61
|
-
- [Breaking] The healthcare entities returned by `beginAnalyzeHealthcare` are now organized as a directed graph where the edges represent a certain type of healthcare relationship between the source and target entities. Edges are stored in the `relatedEntities` property.
|
|
62
|
-
- [Breaking] The `links` property of `HealthcareEntity` is renamed to `dataSources`, a list of objects representing medical databases, where each object has `name` and `entityId` properties.
|
|
63
|
-
- The poller for the `beginAnalyzeBatchActions` long-running operation gained the ability to return certain metadata information about the currently running operation (e.g., when the operation was created, will be expired, and last time it was updated, and also how many actions completed and failed so far). Also, the poller for `beginAnalyzeHealthcareEntities` gained a similar ability.
|
|
64
|
-
- [Breaking] the words "operation" and "action" are used consistently in our names and documentation instead of "job" and "task" respectively.
|
|
65
|
-
|
|
66
|
-
## 5.1.0-beta.3 (2020-11-23)
|
|
67
|
-
|
|
68
|
-
- We are now targeting the service's v3.1-preview.3 API as the default instead of v3.1-preview.2.
|
|
69
|
-
- We introduced the `beginAnalyze` API which supports long-running batch process of Named Entity Recognition, Personally identifiable Information, and Key Phrase Extraction.
|
|
70
|
-
- We now have added support for the recognition of healthcare entities with the introduction of the `beginAnalyzeHealthcare` API. Since the Health API is currently only available in a gated preview, you need to have your subscription on the service's allow list. Note that since this is a gated preview, AAD is not supported. For more information, see [the Text Analytics for Health documentation](https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/text-analytics-for-health?tabs=ner#request-access-to-the-public-preview).
|
|
71
|
-
|
|
72
|
-
## 5.1.0-beta.2 (2020-10-06)
|
|
73
|
-
|
|
74
|
-
- [Breaking] The `length` property is removed from `SentenceSentiment`, `Entity`, `Match`, `PiiEntity`, and `CategorizedEntity` because the length information can be accessed from the text property itself using the string's length property.
|
|
75
|
-
|
|
76
|
-
## 5.1.0-beta.1 (2020-09-17)
|
|
77
|
-
|
|
78
|
-
- We are now targeting the service's v3.1-preview.2 API as the default instead of v3.0.
|
|
79
|
-
- We now have added support for opinion mining feature of Sentiment Analysis. To get this support, pass `includeOpinionMining` as True when calling the `analyzeSentiment` endpoint.
|
|
80
|
-
- We have added the `recognizePiiEntities` API which returns entities containing personal information for a batch of documents and also returns the redacted text.
|
|
81
|
-
- The `length` and `offset` properties are added to the `SentenceSentiment`, `Entity`, `Match`, `PiiEntity` and `CategorizedEntity` interfaces to represent the length of the sentence's text and its offset from the start of the document. The unit of distance used is UTF-16 code points.
|
|
82
|
-
- The `text` property of the `SentenceSentiment` interface is no longer marked as optional because the service has always returned it. This interface is used exclusively as an output type so this change does not break existing code.
|
|
83
|
-
- `bingEntitySearchApiId` property is now returned for entities returned by `recognizeLinkedEntities` API and is added to the `LinkedEntity` interface. This property is to be used in conjunction with the Bing Entity Search API to fetch additional relevant information about the returned entity.
|
|
84
|
-
|
|
85
|
-
## 5.0.1 (2020-08-18)
|
|
86
|
-
|
|
87
|
-
- Handles REST exceptions with code InvalidDocumentBatch in a way that maintains backward compatibility.
|
|
88
|
-
|
|
89
|
-
## 5.0.0 (2020-07-27)
|
|
90
|
-
|
|
91
|
-
- Updated the package version to be 5.0.0 instead of 1.0.0 in order to reduce confusion with older versions of the Azure Text Analytics SDKs.
|
|
92
|
-
|
|
93
|
-
## 1.0.0 (2020-06-09)
|
|
94
|
-
|
|
95
|
-
- This release marks the general availability of the `@azure/ai-text-analytics` package.
|
|
96
|
-
|
|
97
|
-
## 1.0.0-preview.5 (2020-05-26)
|
|
98
|
-
|
|
99
|
-
- [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`)
|
|
100
|
-
- [Breaking] Renamed `score` to `confidenceScore` in the `Match`, `Entity`, and `DetectedLanguage` types.
|
|
101
|
-
- [Breaking] Removed the `graphemeOffset` and `graphemeLength` properties of the `Match`, `Entity`, and `SentenceSentiment` types.
|
|
102
|
-
- [Breaking] Renamed the `graphemeCount` property of `TextDocumentStatistics` back to `characterCount`
|
|
103
|
-
- Added a `text` property to `SentenceSentiment` that contains the sentence text
|
|
104
|
-
- [Breaking] Removed the `warnings` property of `SentenceSentiment`.
|
|
105
|
-
- Added `warnings` property to every document response object containing a list of `TextAnalyticsWarning` objects relevant to the corresponding document.
|
|
106
|
-
- Migrated to using the Text Analytics v3.0 (General Availability) service endpoint.
|
|
107
|
-
|
|
108
|
-
## 1.0.0-preview.4 (2020-04-07)
|
|
109
|
-
|
|
110
|
-
- Renamed the first parameter of all operation methods from `inputs` to `documents`
|
|
111
|
-
- [Breaking] Removed PII entity detection methods from `TextAnalyticsClient` as well as all associated samples and documentation
|
|
112
|
-
- [Breaking] Replaced `TextAnalyticsApiKeyCredential` with `AzureKeyCredential` (re-exported through this package from `@azure/core-auth`).
|
|
113
|
-
- `TextAnalyticsClient` methods now throw an error when the `documents` parameter is not an array or empty before sending a request to the Text Analytics service.
|
|
114
|
-
|
|
115
|
-
## 1.0.0-preview.3 (2020-03-10)
|
|
116
|
-
|
|
117
|
-
- [Breaking] Renamed `id` to `dataSourceEntityId` in the `LinkedEntity` type.
|
|
118
|
-
- Added special handling for the string `"none"` as the `countryHint` parameter of the `TextAnalyticsClient.detectLanguage`. `"none"` is now treated the same as the empty string, and indicates that the default language detection model should be used.
|
|
119
|
-
- [Breaking] Renamed `offset` to `graphemeOffset` and `length` to `graphemeLength` in fields of response objects as appropriate in order to make it clear that the offsets and lengths are in units of Unicode graphemes.
|
|
120
|
-
- [Breaking] Renamed `sentimentScores` on both `DocumentSentiment` and `SentenceSentiment` to `confidenceScores`, and renamed the type `SentimentScorePerLabel` to `SentimentConfidenceScores`.
|
|
121
|
-
- [Breaking] Renamed `characterCount` to `graphemeCount` in the `DocumentStatistics` interface, to align with the change to using `grapheme` in the lengths/offsets of response objects.
|
|
122
|
-
|
|
123
|
-
## 1.0.0-preview.2 (2020-02-11)
|
|
124
|
-
|
|
125
|
-
- Added support for rotating API keys via the `TextAnalyticsApiKeyCredential.updateKey` method.
|
|
126
|
-
- Added a discriminant type for `TextAnalyticsResult.error` to allow for easy differentiation between success and error types using `if (result.error) { ... }` in both TypeScript and JavaScript.
|
|
127
|
-
- [Breaking] Removed the `Entity` type and added new return types `CategorizedEntity` and `PiiEntity` for the `recognizeEntities` and `recognizePiiEntities` methods respectively. These types are equivalent to the previous `Entity` type.
|
|
128
|
-
- [Breaking] Removed the `detectedLanguages` property from `DetectLanguageResult`, as the service currently only returns one language.
|
|
129
|
-
- [Breaking] Renamed the `detectLanguages` method to `detectLanguage`, as the `detectedLanguages` property was removed from the `DetectLanguageResult` return type.
|
|
130
|
-
- [Breaking] Renamed `documentScores` and `sentenceScores` on the `DocumentSentiment` and `SentenceSentiment` types both to `sentimentScores`.
|
|
131
|
-
- [Breaking] Renamed `type` and `subtype` to `category` and `subcategory` respectively in the `CategorizedEntity` and `PiiEntity` types.
|
|
132
|
-
- [Breaking] Renamed `DocumentSentimentValue` and `SentenceSentimentValue` to `DocumentSentimentLabel` and `SentenceSentimentLabel` respectively.
|
|
133
|
-
- [Breaking] Renamed `SentimentConfidenceScorePerLabel` to `SentimentScorePerLabel`.
|
|
134
|
-
- [Breaking] Refactored `TextAnalyticsError` to flatten the error hierarchy and remove `innerError`. The new error model has properties for `code`, `message`, and an optional `target` only. The `code` property of `TextAnalyticsError` can now contain all of the codes from the previous `InnerErrorCodeValue` as well as those from the top-level `ErrorCodeValue`.
|
|
135
|
-
|
|
136
|
-
## 1.0.0-preview.1 (2020-01-09)
|
|
137
|
-
|
|
138
|
-
- This release is a preview of our efforts to create a client library that is user friendly and
|
|
139
|
-
idiomatic to the JavaScript ecosystem. The reasons for most of the changes in this update can be found in the
|
|
140
|
-
[Azure SDK Design Guidelines for TypeScript](https://azure.github.io/azure-sdk/typescript_introduction.html).
|
|
141
|
-
- Differences from previous public package `@azure/cognitiveservices-textanalytics`
|
|
142
|
-
- Package name changed from `@azure/cognitiveservices-textanalytics` to `@azure/ai-text-analytics`.
|
|
143
|
-
- Package targets version `3.0` of the service API.
|
|
144
|
-
- Supports authentication via `@azure/identity`.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
-
*/
|
|
8
|
-
import * as coreClient from "@azure/core-client";
|
|
9
|
-
/** @internal */
|
|
10
|
-
export class GeneratedClientContext extends coreClient.ServiceClient {
|
|
11
|
-
/**
|
|
12
|
-
* Initializes a new instance of the GeneratedClientContext class.
|
|
13
|
-
* @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example:
|
|
14
|
-
* https://westus.api.cognitive.microsoft.com).
|
|
15
|
-
* @param options The parameter options
|
|
16
|
-
*/
|
|
17
|
-
constructor(endpoint, options) {
|
|
18
|
-
if (endpoint === undefined) {
|
|
19
|
-
throw new Error("'endpoint' cannot be null");
|
|
20
|
-
}
|
|
21
|
-
// Initializing default values for options
|
|
22
|
-
if (!options) {
|
|
23
|
-
options = {};
|
|
24
|
-
}
|
|
25
|
-
const defaults = {
|
|
26
|
-
requestContentType: "application/json; charset=utf-8"
|
|
27
|
-
};
|
|
28
|
-
const packageDetails = `azsdk-js-ai-text-analytics/5.1.0`;
|
|
29
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
30
|
-
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
31
|
-
: `${packageDetails}`;
|
|
32
|
-
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
33
|
-
userAgentPrefix
|
|
34
|
-
}, baseUri: options.endpoint || "{Endpoint}/text/analytics/{ApiVersion}" });
|
|
35
|
-
super(optionsWithDefaults);
|
|
36
|
-
// Parameter assignments
|
|
37
|
-
this.endpoint = endpoint;
|
|
38
|
-
// Assigning values to Constant parameters
|
|
39
|
-
this.apiVersion = options.apiVersion || "v3.1";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=generatedClientContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generatedClientContext.js","sourceRoot":"","sources":["../../../src/generated/generatedClientContext.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAGjD,gBAAgB;AAChB,MAAM,OAAO,sBAAuB,SAAQ,UAAU,CAAC,aAAa;IAIlE;;;;;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,kCAAkC,CAAC;QAC1D,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,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,OAAO,CAAC,QAAQ,IAAI,wCAAwC,GACtE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,MAAM,CAAC;IACjD,CAAC;CACF","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 { GeneratedClientOptionalParams } from \"./models\";\n\n/** @internal */\nexport class GeneratedClientContext extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the GeneratedClientContext 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 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/5.1.0`;\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 || \"{Endpoint}/text/analytics/{ApiVersion}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"v3.1\";\n }\n}\n"]}
|
package/dist-esm/src/tracing.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { createSpanFunction } from "@azure/core-tracing";
|
|
4
|
-
/**
|
|
5
|
-
* Creates a span using the global tracer.
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export const createSpan = createSpanFunction({
|
|
9
|
-
packagePrefix: "Azure.CognitiveServices.TextAnalytics",
|
|
10
|
-
namespace: "Microsoft.CognitiveServices"
|
|
11
|
-
});
|
|
12
|
-
//# sourceMappingURL=tracing.js.map
|