@azure/ai-language-text 1.1.0-beta.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,7 +46,7 @@ export const endpoint = {
46
46
  export const apiVersion = {
47
47
  parameterPath: "apiVersion",
48
48
  mapper: {
49
- defaultValue: "2022-10-01-preview",
49
+ defaultValue: "2023-04-01",
50
50
  isConstant: true,
51
51
  serializedName: "api-version",
52
52
  type: {
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/generated/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EACL,aAAa,IAAI,mBAAmB,EACpC,oBAAoB,IAAI,0BAA0B,EACnD,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,WAAW,GAAuB;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAuB;IACtC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,mBAAmB;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA0B;IAC7C,aAAa,EAAE,UAAU;IACzB,MAAM,EAAE;QACN,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA4B;IACjD,aAAa,EAAE,YAAY;IAC3B,MAAM,EAAE;QACN,YAAY,EAAE,oBAAoB;QAClC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,aAAa;QAC7B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAA4B;IACxD,aAAa,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC;IAC/C,MAAM,EAAE;QACN,cAAc,EAAE,WAAW;QAC3B,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;SAChB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAuB;IACvC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,0BAA0B;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAA0B;IAC1C,aAAa,EAAE,OAAO;IACtB,MAAM,EAAE;QACN,cAAc,EAAE,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;SACb;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAA4B;IAC1C,aAAa,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;IACjC,MAAM,EAAE;QACN,cAAc,EAAE,KAAK;QACrB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAA4B;IAC3C,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;IAClC,MAAM,EAAE;QACN,cAAc,EAAE,MAAM;QACtB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,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 {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport {\n AnalyzeAction as AnalyzeActionMapper,\n AnalyzeTextJobsInput as AnalyzeTextJobsInputMapper\n} from \"../models/mappers\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const body: OperationParameter = {\n parameterPath: \"body\",\n mapper: AnalyzeActionMapper\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"Endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2022-10-01-preview\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const includeStatistics: OperationQueryParameter = {\n parameterPath: [\"options\", \"includeStatistics\"],\n mapper: {\n serializedName: \"showStats\",\n type: {\n name: \"Boolean\"\n }\n }\n};\n\nexport const body1: OperationParameter = {\n parameterPath: \"body\",\n mapper: AnalyzeTextJobsInputMapper\n};\n\nexport const jobId: OperationURLParameter = {\n parameterPath: \"jobId\",\n mapper: {\n serializedName: \"jobId\",\n required: true,\n type: {\n name: \"Uuid\"\n }\n }\n};\n\nexport const top: OperationQueryParameter = {\n parameterPath: [\"options\", \"top\"],\n mapper: {\n serializedName: \"top\",\n type: {\n name: \"Number\"\n }\n }\n};\n\nexport const skip: OperationQueryParameter = {\n parameterPath: [\"options\", \"skip\"],\n mapper: {\n serializedName: \"skip\",\n type: {\n name: \"Number\"\n }\n }\n};\n"]}
1
+ {"version":3,"file":"parameters.js","source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E,mBAAmB,CAAC;IAC/C,MAAM,EAAE;QACN,cAAc,EAAE,WAAW;QAC3B,IAAI,EAAE;YACJ,IAAI,EAAE,SAAS;SAChB;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAuB;IACvC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,0BAA0B;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAA0B;IAC1C,aAAa,EAAE,OAAO;IACtB,MAAM,EAAE;QACN,cAAc,EAAE,OAAO;QACvB,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;SACb;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAA4B;IAC1C,aAAa,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;IACjC,MAAM,EAAE;QACN,cAAc,EAAE,KAAK;QACrB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAA4B;IAC3C,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;IAClC,MAAM,EAAE;QACN,cAAc,EAAE,MAAM;QACtB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,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 {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport {\n AnalyzeAction as AnalyzeActionMapper,\n AnalyzeTextJobsInput as AnalyzeTextJobsInputMapper\n} from \"../models/mappers\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const body: OperationParameter = {\n parameterPath: \"body\",\n mapper: AnalyzeActionMapper\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"Endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2023-04-01\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const includeStatistics: OperationQueryParameter = {\n parameterPath: [\"options\", \"includeStatistics\"],\n mapper: {\n serializedName: \"showStats\",\n type: {\n name: \"Boolean\"\n }\n }\n};\n\nexport const body1: OperationParameter = {\n parameterPath: \"body\",\n mapper: AnalyzeTextJobsInputMapper\n};\n\nexport const jobId: OperationURLParameter = {\n parameterPath: \"jobId\",\n mapper: {\n serializedName: \"jobId\",\n required: true,\n type: {\n name: \"Uuid\"\n }\n }\n};\n\nexport const top: OperationQueryParameter = {\n parameterPath: [\"options\", \"top\"],\n mapper: {\n serializedName: \"top\",\n type: {\n name: \"Number\"\n }\n }\n};\n\nexport const skip: OperationQueryParameter = {\n parameterPath: [\"options\", \"skip\"],\n mapper: {\n serializedName: \"skip\",\n type: {\n name: \"Number\"\n }\n }\n};\n"]}
@@ -14,5 +14,5 @@ export { TextAnalysisClient } from "./textAnalysisClient";
14
14
  export * from "./models";
15
15
  export {
16
16
  /** orphan exports */
17
- KnownPiiEntityDomain, KnownPiiEntityCategory, KnownStringIndexType, KnownErrorCode, KnownInnerErrorCode, KnownClassificationType, KnownHealthcareDocumentType, KnownRelationType, KnownScriptKind, KnownExtractiveSummarizationOrderingCriteria, KnownAgeUnit, KnownAreaUnit, KnownDateTimeSubKind, KnownInformationUnit, KnownHealthcareEntityCategory, KnownLengthUnit, KnownNumberKind, KnownRangeKind, KnownSpeedUnit, KnownTemperatureUnit, KnownTemporalModifier, KnownVolumeUnit, KnownWeightUnit, KnownRelativeTo, KnownResolutionKind, } from "./generated/models";
17
+ KnownPiiEntityDomain, KnownPiiEntityCategory, KnownStringIndexType, KnownErrorCode, KnownInnerErrorCode, KnownRelationType, KnownExtractiveSummarizationOrderingCriteria, KnownHealthcareEntityCategory, } from "./generated/models";
18
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,UAAU,CAAC;AACzB,OAAO;AAmFL,qBAAqB;AACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EAEnB,uBAAuB,EACvB,2BAA2B,EAC3B,iBAAiB,EACjB,eAAe,EACf,4CAA4C,EAC5C,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,eAAe,EACf,mBAAmB,GACpB,MAAM,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * [Azure Cognitive Language Services](https://docs.microsoft.com/azure/cognitive-services/language-service/overview)\n * is a suite of natural language processing (NLP) skills built with\n * best-in-class Microsoft machine learning algorithms used to analyze\n * unstructured text for actions such as sentiment analysis, key phrase\n * extraction, and language detection.\n *\n * @packageDocumentation\n */\n\nexport { AzureKeyCredential } from \"@azure/core-auth\";\n\nexport { TextAnalysisClient } from \"./textAnalysisClient\";\nexport * from \"./models\";\nexport {\n AssessmentSentiment,\n SentimentAnalysisAction,\n EntityLinkingAction,\n EntityRecognitionAction,\n KeyPhraseExtractionAction,\n LanguageDetectionAction,\n PiiEntityRecognitionAction,\n StringIndexType,\n LinkedEntity,\n Entity,\n DetectedLanguage,\n PiiEntityCategory,\n PiiEntityDomain,\n SentimentConfidenceScores,\n SentenceSentimentLabel,\n DocumentSentimentLabel,\n TargetConfidenceScores,\n TokenSentimentLabel,\n LanguageDetectionInput,\n TextDocumentInput,\n TextDocumentStatistics,\n DocumentWarning,\n WarningCode,\n Match,\n ActionCommon,\n ActionPrebuilt,\n HealthcareAction,\n CustomEntityRecognitionAction,\n CustomSingleLabelClassificationAction,\n CustomMultiLabelClassificationAction,\n ActionCustom,\n ClassificationCategory,\n HealthcareAssertion,\n HealthcareEntityCategory,\n EntityDataSource,\n RelationType,\n EntityAssociation,\n EntityCertainty,\n EntityConditionality,\n HealthcareDocumentType,\n SummaryContext,\n AbstractiveSummary,\n ClassificationType,\n DocumentDetectedLanguage,\n ScriptKind,\n ExtractiveSummarizationAction,\n SummarySentence,\n FhirVersion,\n DynamicClassificationAction,\n ExtractiveSummarizationOrderingCriteria,\n EntityWithResolution,\n BaseResolutionUnion,\n BaseResolution,\n AgeResolution,\n VolumeResolution,\n SpeedResolution,\n AreaResolution,\n LengthResolution,\n InformationResolution,\n TemperatureResolution,\n WeightResolution,\n CurrencyResolution,\n BooleanResolution,\n DateTimeResolution,\n NumberResolution,\n OrdinalResolution,\n TemporalSpanResolution,\n NumericRangeResolution,\n AreaUnit,\n DateTimeSubKind,\n TemporalModifier,\n InformationUnit,\n LengthUnit,\n NumberKind,\n RangeKind,\n RelativeTo,\n SpeedUnit,\n TemperatureUnit,\n VolumeUnit,\n WeightUnit,\n QuantityResolution,\n AgeUnit,\n /** orphan exports */\n KnownPiiEntityDomain,\n KnownPiiEntityCategory,\n KnownStringIndexType,\n KnownErrorCode,\n KnownInnerErrorCode,\n TextDocumentBatchStatistics,\n KnownClassificationType,\n KnownHealthcareDocumentType,\n KnownRelationType,\n KnownScriptKind,\n KnownExtractiveSummarizationOrderingCriteria,\n KnownAgeUnit,\n KnownAreaUnit,\n KnownDateTimeSubKind,\n KnownInformationUnit,\n KnownHealthcareEntityCategory,\n KnownLengthUnit,\n KnownNumberKind,\n KnownRangeKind,\n KnownSpeedUnit,\n KnownTemperatureUnit,\n KnownTemporalModifier,\n KnownVolumeUnit,\n KnownWeightUnit,\n KnownRelativeTo,\n KnownResolutionKind,\n} from \"./generated/models\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;GAQG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,UAAU,CAAC;AACzB,OAAO;AA6CL,qBAAqB;AACrB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EAEnB,iBAAiB,EACjB,4CAA4C,EAC5C,6BAA6B,GAC9B,MAAM,oBAAoB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * [Azure Cognitive Language Services](https://docs.microsoft.com/azure/cognitive-services/language-service/overview)\n * is a suite of natural language processing (NLP) skills built with\n * best-in-class Microsoft machine learning algorithms used to analyze\n * unstructured text for actions such as sentiment analysis, key phrase\n * extraction, and language detection.\n *\n * @packageDocumentation\n */\n\nexport { AzureKeyCredential } from \"@azure/core-auth\";\n\nexport { TextAnalysisClient } from \"./textAnalysisClient\";\nexport * from \"./models\";\nexport {\n AssessmentSentiment,\n SentimentAnalysisAction,\n EntityLinkingAction,\n EntityRecognitionAction,\n KeyPhraseExtractionAction,\n LanguageDetectionAction,\n PiiEntityRecognitionAction,\n StringIndexType,\n LinkedEntity,\n Entity,\n DetectedLanguage,\n PiiEntityCategory,\n PiiEntityDomain,\n SentimentConfidenceScores,\n SentenceSentimentLabel,\n DocumentSentimentLabel,\n TargetConfidenceScores,\n TokenSentimentLabel,\n LanguageDetectionInput,\n TextDocumentInput,\n TextDocumentStatistics,\n DocumentWarning,\n WarningCode,\n Match,\n ActionCommon,\n ActionPrebuilt,\n HealthcareAction,\n CustomEntityRecognitionAction,\n CustomSingleLabelClassificationAction,\n CustomMultiLabelClassificationAction,\n ActionCustom,\n ClassificationCategory,\n HealthcareAssertion,\n HealthcareEntityCategory,\n EntityDataSource,\n RelationType,\n EntityAssociation,\n EntityCertainty,\n EntityConditionality,\n SummaryContext,\n AbstractiveSummary,\n ExtractiveSummarizationAction,\n SummarySentence,\n ExtractiveSummarizationOrderingCriteria,\n /** orphan exports */\n KnownPiiEntityDomain,\n KnownPiiEntityCategory,\n KnownStringIndexType,\n KnownErrorCode,\n KnownInnerErrorCode,\n TextDocumentBatchStatistics,\n KnownRelationType,\n KnownExtractiveSummarizationOrderingCriteria,\n KnownHealthcareEntityCategory,\n} from \"./generated/models\";\n"]}
@@ -11,7 +11,6 @@ export const AnalyzeActionNames = {
11
11
  PiiEntityRecognition: "PiiEntityRecognition",
12
12
  LanguageDetection: "LanguageDetection",
13
13
  SentimentAnalysis: "SentimentAnalysis",
14
- DynamicClassification: "DynamicClassification",
15
14
  };
16
15
  /**
17
16
  * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.
@@ -29,14 +28,6 @@ export const AnalyzeBatchActionNames = {
29
28
  CustomSingleLabelClassification: "CustomSingleLabelClassification",
30
29
  CustomMultiLabelClassification: "CustomMultiLabelClassification",
31
30
  };
32
- /**
33
- * Known values of the {@link HealthcareAction.fhirVersion} parameter.
34
- */
35
- export var KnownFhirVersion;
36
- (function (KnownFhirVersion) {
37
- /** 4.0.1 */
38
- KnownFhirVersion["4.0.1"] = "4.0.1";
39
- })(KnownFhirVersion || (KnownFhirVersion = {}));
40
31
  /**
41
32
  * Enum of possible error codes of a {@link TextAnalysisError}.
42
33
  */
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAsBL,cAAc,EACd,mBAAmB,GAcpB,MAAM,aAAa,CAAC;AA0DrB;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,aAAa,EAAE,eAAe;IAC9B,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,oBAAoB,EAAE,sBAAsB;IAC5C,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,qBAAqB,EAAE,uBAAuB;CACtC,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,oBAAoB,EAAE,sBAAsB;IAC5C,mBAAmB,EAAE,qBAAqB;IAC1C,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,uBAAuB,EAAE,yBAAyB;IAClD,wBAAwB,EAAE,0BAA0B;IACpD,uBAAuB,EAAE,yBAAyB;IAClD,+BAA+B,EAAE,iCAAiC;IAClE,8BAA8B,EAAE,gCAAgC;CACxD,CAAC;AAiCX;;GAEG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,YAAY;IACZ,mCAAiB,CAAA;AACnB,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAcD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,mCAAQ,cAAc,GAAK,mBAAmB,CAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n AbstractiveSummary,\n AssessmentSentiment,\n ClassificationCategory,\n CustomEntityRecognitionAction,\n CustomMultiLabelClassificationAction,\n CustomSingleLabelClassificationAction,\n DetectedLanguage,\n DocumentDetectedLanguage,\n DocumentSentimentLabel,\n DocumentWarning,\n DynamicClassificationAction,\n Entity,\n EntityDataSource,\n EntityLinkingAction,\n EntityRecognitionAction,\n EntityWithResolution,\n ExtractiveSummarizationAction,\n HealthcareAction,\n HealthcareAssertion,\n HealthcareEntityCategory,\n KeyPhraseExtractionAction,\n KnownErrorCode,\n KnownInnerErrorCode,\n LanguageDetectionAction,\n LinkedEntity,\n PiiEntityRecognitionAction,\n RelationType,\n SentenceSentimentLabel,\n SentimentAnalysisAction,\n SentimentConfidenceScores,\n StringIndexType,\n SummarySentence,\n TargetConfidenceScores,\n TextDocumentBatchStatistics,\n TextDocumentStatistics,\n TokenSentimentLabel,\n} from \"./generated\";\nimport { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport { OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Configuration options for {@link TextAnalysisClient}.\n */\nexport interface TextAnalysisClientOptions extends CommonClientOptions {\n /**\n * The default country hint to use. Defaults to \"us\".\n */\n defaultCountryHint?: string;\n\n /**\n * The default language to use. Defaults to \"en\".\n */\n defaultLanguage?: string;\n /**\n * The version of the Cognitive Language Service API to use.\n */\n serviceVersion?: string;\n}\n\n/**\n * Options common to all operations.\n */\nexport interface TextAnalysisOperationOptions extends OperationOptions {\n /**\n * If set to true, response will contain input and document level statistics.\n */\n includeStatistics?: boolean;\n}\n\n/**\n * Options for the begin analyze actions operation.\n */\nexport interface BeginAnalyzeBatchOptions extends TextAnalysisOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n /**\n * The operation's display name.\n */\n displayName?: string;\n}\n\n/**\n * Options for the begin analyze actions operation.\n */\nexport interface RestoreAnalyzeBatchPollerOptions extends TextAnalysisOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.analyze} method.\n */\nexport const AnalyzeActionNames = {\n EntityLinking: \"EntityLinking\",\n EntityRecognition: \"EntityRecognition\",\n KeyPhraseExtraction: \"KeyPhraseExtraction\",\n PiiEntityRecognition: \"PiiEntityRecognition\",\n LanguageDetection: \"LanguageDetection\",\n SentimentAnalysis: \"SentimentAnalysis\",\n DynamicClassification: \"DynamicClassification\",\n} as const;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.\n */\nexport const AnalyzeBatchActionNames = {\n SentimentAnalysis: \"SentimentAnalysis\",\n EntityRecognition: \"EntityRecognition\",\n PiiEntityRecognition: \"PiiEntityRecognition\",\n KeyPhraseExtraction: \"KeyPhraseExtraction\",\n EntityLinking: \"EntityLinking\",\n Healthcare: \"Healthcare\",\n ExtractiveSummarization: \"ExtractiveSummarization\",\n AbstractiveSummarization: \"AbstractiveSummarization\",\n CustomEntityRecognition: \"CustomEntityRecognition\",\n CustomSingleLabelClassification: \"CustomSingleLabelClassification\",\n CustomMultiLabelClassification: \"CustomMultiLabelClassification\",\n} as const;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.analyze} method.\n */\nexport type AnalyzeActionName = keyof typeof AnalyzeActionNames;\n\n/**\n * The type of parameters for every action in ${@link AnalyzeActionNames}.\n */\nexport type AnalyzeActionParameters<ActionName extends AnalyzeActionName> = {\n EntityLinking: EntityLinkingAction;\n EntityRecognition: EntityRecognitionAction;\n PiiEntityRecognition: PiiEntityRecognitionAction;\n KeyPhraseExtraction: KeyPhraseExtractionAction;\n SentimentAnalysis: SentimentAnalysisAction;\n DynamicClassification: DynamicClassificationAction;\n LanguageDetection: LanguageDetectionAction;\n}[ActionName];\n\n/**\n * The type of results of every action in ${@link AnalyzeActionNames}.\n */\nexport type AnalyzeResult<ActionName extends AnalyzeActionName> = {\n EntityLinking: EntityLinkingResult[];\n EntityRecognition: EntityRecognitionResult[];\n PiiEntityRecognition: PiiEntityRecognitionResult[];\n KeyPhraseExtraction: KeyPhraseExtractionResult[];\n SentimentAnalysis: SentimentAnalysisResult[];\n DynamicClassification: DynamicClassificationResult[];\n LanguageDetection: LanguageDetectionResult[];\n}[ActionName];\n\n/**\n * Known values of the {@link HealthcareAction.fhirVersion} parameter.\n */\nexport enum KnownFhirVersion {\n /** 4.0.1 */\n \"4.0.1\" = \"4.0.1\",\n}\n\n/** Options for an Abstractive Summarization action. */\nexport interface AbstractiveSummarizationAction {\n /** The approximate number of sentences to be part of the summary. */\n sentenceCount?: number;\n /**\n * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}.\n *\n * The default is the JavaScript's default which is \"Utf16CodeUnit\".\n */\n stringIndexType?: StringIndexType;\n}\n\n/**\n * Enum of possible error codes of a {@link TextAnalysisError}.\n */\nexport const KnownTextAnalysisErrorCode = { ...KnownErrorCode, ...KnownInnerErrorCode };\n\n/**\n * Type describing an API error.\n */\nexport interface TextAnalysisError {\n /**\n * A code describing the kind of error produced. See {@link KnownTextAnalysisErrorCode}.\n */\n readonly code: string;\n /**\n * A message from the service explaining the error\n */\n readonly message: string;\n /**\n * The target of the particular error (for example, the name of an invalid parameter)\n */\n readonly target?: string;\n}\n\n/**\n * Base type for results of an action corresponding to a single input document.\n */\nexport interface TextAnalysisSuccessResult {\n /**\n * Unique, non-empty document identifier.\n */\n readonly id: string;\n\n /**\n * Statistics about the input document and how it was processed by the service.\n * This property will have a value when includeStatistics is set to true in\n * the client call.\n */\n readonly statistics?: TextDocumentStatistics;\n\n /**\n * An array of warning data corresponding to this document.\n *\n * If no warnings were returned, this array will be empty.\n */\n readonly warnings: DocumentWarning[];\n\n /**\n * Discriminant to determine if this is an error result.\n */\n readonly error?: undefined;\n}\n\n/**\n * Base type for error results of an action corresponding to a single document.\n */\nexport interface TextAnalysisErrorResult {\n /**\n * Unique, non-empty document identifier.\n */\n readonly id: string;\n\n /**\n * The Error for this document result.\n */\n readonly error: TextAnalysisError;\n}\n\n/**\n * The result of an entity recognition action on a single document.\n */\nexport type EntityRecognitionResult = EntityRecognitionSuccessResult | EntityRecognitionErrorResult;\n\n/**\n * The result of an entity recognition action on a single document, containing\n * a collection of {@link Entity} objects identified in that document.\n */\nexport interface EntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: EntityWithResolution[];\n}\n\n/**\n * An error result from an entity recognition action on a single document.\n */\nexport type EntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of an entity recognition action on a single document.\n */\nexport type PiiEntityRecognitionResult =\n | PiiEntityRecognitionSuccessResult\n | PiiEntityRecognitionErrorResult;\n\n/**\n * The result of a pii entity recognition action on a single document,\n * containing the collection of {@link Entity} objects identified in that\n * document.\n */\nexport interface PiiEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n /**\n * The text redacted.\n */\n readonly redactedText: string;\n}\n\n/**\n * An error result from a pii entity recognition action on a single document.\n */\nexport type PiiEntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of an entity linking action on a single document.\n */\nexport type EntityLinkingResult = EntityLinkingSuccessResult | EntityLinkingErrorResult;\n\n/**\n * The result of a entity linking action on a single document, containing a\n * collection of the {@link LinkedEntity} objects identified in that document.\n */\nexport interface EntityLinkingSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: LinkedEntity[];\n}\n\n/**\n * An error result from an entity linking action on a single document.\n */\nexport type EntityLinkingErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a language detection action on a single document.\n */\nexport type LanguageDetectionResult = LanguageDetectionSuccessResult | LanguageDetectionErrorResult;\n\n/**\n * The result of a language detection action on a single document,\n * containing a prediction of what language the document is written in.\n */\nexport interface LanguageDetectionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The top detected language by confidence score.\n */\n readonly primaryLanguage: DetectedLanguage;\n}\n\n/**\n * An error result from a language detection action on a single document.\n */\nexport type LanguageDetectionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document.\n */\nexport type KeyPhraseExtractionResult =\n | KeyPhraseExtractionSuccessResult\n | KeyPhraseExtractionErrorResult;\n\n/**\n * The result of a key phrase extraction action on a single document,\n * containing a collection of the key phrases identified in that document.\n */\nexport interface KeyPhraseExtractionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of representative words or phrases. The number of key phrases\n * returned is proportional to the number of words in the input document.\n */\n readonly keyPhrases: string[];\n}\n\n/**\n * An error result from a key phrase extraction action on a single document.\n */\nexport type KeyPhraseExtractionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document.\n */\nexport type SentimentAnalysisResult = SentimentAnalysisSuccessResult | SentimentAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document,\n * containing the predicted sentiment for each sentence as well as for the full\n * document.\n */\nexport interface SentimentAnalysisSuccessResult extends TextAnalysisSuccessResult {\n /**\n * Predicted sentiment for document. For a list of possible values, see {@link DocumentSentimentLabel}\n */\n readonly sentiment: DocumentSentimentLabel;\n /**\n * Document level sentiment confidence scores between 0 and 1 for each\n * sentiment class.\n */\n readonly confidenceScores: SentimentConfidenceScores;\n /**\n * The predicted sentiment for each sentence in the corresponding document.\n */\n readonly sentences: SentenceSentiment[];\n}\n\n/**\n * The predicted sentiment for a given span of text. For more information\n * regarding text sentiment, see {@link https://docs.microsoft.com//azure/cognitive-services/language-service/sentiment-opinion-mining/overview}.\n */\nexport interface SentenceSentiment {\n /**\n * The sentence text.\n */\n readonly text: string;\n /**\n * The predicted Sentiment for the sentence. For a list of possible values,\n * see {@link SentenceSentimentLabel}\n */\n readonly sentiment: SentenceSentimentLabel;\n /**\n * The sentiment confidence score between 0 and 1 for the sentence for all\n * classes.\n */\n readonly confidenceScores: SentimentConfidenceScores;\n /**\n * The sentence text offset from the start of the document.\n */\n readonly offset: number;\n /**\n * The length of the sentence text.\n */\n readonly length: number;\n /**\n * The list of opinions mined from this sentence. For example in \"The food is\n * good, but the service is bad\", the following two opinions will be returned:\n * \"food is good\" and \"service is bad\".\n *\n * It is non-empty only returned if {@link includeOpinionMining} was set to\n * `true`.\n */\n readonly opinions: Opinion[];\n}\n\n/**\n * TargetSentiment contains the predicted sentiment, confidence scores and other\n * information about a target of a product. A target of a product/service is a\n * key component of that product/service. For example in \"The food at Hotel Foo\n * is good\", \"food\" is a target of \"Hotel Foo\".\n */\nexport interface TargetSentiment {\n /**\n * The sentiment confidence score between 0 and 1 for the target for\n * 'positive' and 'negative' labels.\n */\n readonly confidenceScores: TargetConfidenceScores;\n /**\n * The predicted Sentiment for the Target. For a list of possible values,\n * see {@link TokenSentimentLabel}\n */\n readonly sentiment: TokenSentimentLabel;\n /**\n * The target text.\n */\n readonly text: string;\n /**\n * The Target text offset from the start of the sentence.\n */\n readonly offset: number;\n /**\n * The length of the Target text.\n */\n readonly length: number;\n}\n\n/**\n * A mined opinion object represents an opinion we've extracted from a sentence.\n * It consists of both a target that these assessments are about, and the actual\n * assessments themselves.\n */\nexport interface Opinion {\n /**\n * The target of a product/service that this assessment is about.\n */\n readonly target: TargetSentiment;\n /**\n * The actual assessments of the target.\n */\n readonly assessments: AssessmentSentiment[];\n}\n\n/**\n * The result of a language detection action on a single document.\n */\nexport type DynamicClassificationResult =\n | DynamicClassificationSuccessResult\n | DynamicClassificationErrorResult;\n\n/**\n * The result of a language detection action on a single document,\n * containing a prediction of what language the document is written in.\n */\nexport interface DynamicClassificationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of classifications in the input document.\n */\n readonly classifications: ClassificationCategory[];\n}\n\n/**\n * An error result from a language detection action on a single document.\n */\nexport type DynamicClassificationErrorResult = TextAnalysisErrorResult;\n\n/**\n * A healthcare entity represented as a node in a directed graph where the edges are\n * a particular type of relationship between the source and target nodes.\n */\nexport interface HealthcareEntity extends Entity {\n /**\n * Normalized name for the entity. For example, the normalized text for \"histologically\" is \"histologic\".\n */\n readonly normalizedText?: string;\n /**\n * Whether the entity is negated.\n */\n readonly assertion?: HealthcareAssertion;\n /**\n * Entity references in known data sources.\n */\n readonly dataSources: EntityDataSource[];\n /**\n * Defines values for HealthcareEntityCategory.\n * {@link KnownHealthcareEntityCategory} can be used interchangeably with HealthcareEntityCategory,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **BODY_STRUCTURE**\n * **AGE**\n * **GENDER**\n * **EXAMINATION_NAME**\n * **DATE**\n * **DIRECTION**\n * **FREQUENCY**\n * **MEASUREMENT_VALUE**\n * **MEASUREMENT_UNIT**\n * **RELATIONAL_OPERATOR**\n * **TIME**\n * **GENE_OR_PROTEIN**\n * **VARIANT**\n * **ADMINISTRATIVE_EVENT**\n * **CARE_ENVIRONMENT**\n * **HEALTHCARE_PROFESSION**\n * **DIAGNOSIS**\n * **SYMPTOM_OR_SIGN**\n * **CONDITION_QUALIFIER**\n * **MEDICATION_CLASS**\n * **MEDICATION_NAME**\n * **DOSAGE**\n * **MEDICATION_FORM**\n * **MEDICATION_ROUTE**\n * **FAMILY_RELATION**\n * **TREATMENT_NAME**\n */\n readonly category: HealthcareEntityCategory;\n}\n\n/**\n * The type of different roles a healthcare entity can play in a relation.\n */\nexport type HealthcareEntityRelationRoleType = string;\n\n/**\n * A healthcare entity that plays a specific role in a relation.\n */\nexport interface HealthcareEntityRelationRole {\n /**\n * A healthcare entity\n */\n readonly entity: HealthcareEntity;\n /**\n * The role of the healthcare entity in a particular relation.\n */\n readonly name: HealthcareEntityRelationRoleType;\n}\n\n/**\n * A relationship between two or more healthcare entities.\n */\nexport interface HealthcareEntityRelation {\n /**\n * The type of the healthcare relation.\n */\n readonly relationType: RelationType;\n /**\n * The list of healthcare entities and their roles in the healthcare relation.\n */\n readonly roles: HealthcareEntityRelationRole[];\n /**\n * The confidence score between 0 and 1 of the extracted relation.\n */\n readonly confidenceScore?: number;\n}\n\n/**\n * The results of a successful healthcare analysis action for a single document.\n */\nexport interface HealthcareSuccessResult extends TextAnalysisSuccessResult {\n /**\n * Healthcare entities.\n */\n readonly entities: HealthcareEntity[];\n /**\n * Relations between healthcare entities.\n */\n readonly entityRelations: HealthcareEntityRelation[];\n /**\n * JSON bundle containing a FHIR compatible object for consumption in other\n * Healthcare tools. For additional information see {@link https://www.hl7.org/fhir/overview.html}.\n */\n readonly fhirBundle?: Record<string, any>;\n}\n\n/**\n * An error result from the healthcare analysis action on a single document.\n */\nexport type HealthcareErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the healthcare analysis action on a single document.\n */\nexport type HealthcareResult = HealthcareSuccessResult | HealthcareErrorResult;\n\n/**\n * The result of the extractive summarization action on a single document.\n */\nexport type ExtractiveSummarizationResult =\n | ExtractiveSummarizationSuccessResult\n | ExtractiveSummarizationErrorResult;\n\n/**\n * The result of the extractive summarization action on a single document,\n * containing a collection of the summary identified in that document.\n */\nexport interface ExtractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of sentences composing a summary of the input document.\n */\n readonly sentences: SummarySentence[];\n}\n\n/**\n * An error result from the extractive summarization action on a single document.\n */\nexport type ExtractiveSummarizationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the abstractive summarization action on a single document.\n */\nexport type AbstractiveSummarizationResult =\n | AbstractiveSummarizationSuccessResult\n | AbstractiveSummarizationErrorResult;\n\n/**\n * The result of the abstractive summarization action on a single document,\n * containing a collection of the summaries identified for that document.\n */\nexport interface AbstractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of summaries of the input document.\n */\n readonly summaries: AbstractiveSummary[];\n}\n\n/**\n * An error result from the abstractive summarization action on a single document.\n */\nexport type AbstractiveSummarizationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the custom entity recognition action on a single document.\n */\nexport type CustomEntityRecognitionResult =\n | CustomEntityRecognitionSuccessResult\n | CustomEntityRecognitionErrorResult;\n\n/**\n * The result of the custom entity recognition action on a single document,\n * containing a collection of the entities identified in that document.\n */\nexport interface CustomEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n}\n\n/**\n * An error result from the custom entity recognition action on a single document.\n */\nexport type CustomEntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the single-label classification action on a single document.\n */\nexport type CustomSingleLabelClassificationResult =\n | CustomSingleLabelClassificationSuccessResult\n | CustomSingleLabelClassificationErrorResult;\n\n/**\n * The result of a successful single-label classification action on a single document,\n * containing the result of the classification.\n */\nexport interface CustomSingleLabelClassificationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of classifications in the input document.\n */\n readonly classifications: ClassificationCategory[];\n}\n\n/**\n * An error result from the single-label classification action on a single document.\n */\nexport type CustomSingleLabelClassificationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the multi-label classification action on a multi document.\n */\nexport type CustomMultiLabelClassificationResult =\n | CustomMultiLabelClassificationSuccessResult\n | CustomMultiLabelClassificationErrorResult;\n\n/**\n * The result of a successful multi-label classification action on a multi document,\n * containing the result of the classification.\n */\nexport interface CustomMultiLabelClassificationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of classifications in the input document.\n */\n readonly classifications: ClassificationCategory[];\n}\n\n/**\n * An error result from the multi-label classification action on a multi document.\n */\nexport type CustomMultiLabelClassificationErrorResult = TextAnalysisErrorResult;\n\n/**\n * Options common to all batch actions.\n */\nexport interface AnalyzeBatchActionCommon {\n /**\n * The name of the action.\n */\n actionName?: string;\n}\n\n/** Options for an entity linking batch action. */\nexport interface EntityLinkingBatchAction extends AnalyzeBatchActionCommon, EntityLinkingAction {\n /**\n * The kind of the action.\n */\n kind: \"EntityLinking\";\n}\n\n/** Options for an entity recognition batch action. */\nexport interface EntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n EntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"EntityRecognition\";\n}\n\n/** Options for an key phrase extraction batch action. */\nexport interface KeyPhraseExtractionBatchAction\n extends AnalyzeBatchActionCommon,\n KeyPhraseExtractionAction {\n /**\n * The kind of the action.\n */\n kind: \"KeyPhraseExtraction\";\n}\n\n/** Options for a pii entity recognition batch action. */\nexport interface PiiEntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n PiiEntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"PiiEntityRecognition\";\n}\n\n/** Options for a healthcare batch action. */\nexport interface HealthcareBatchAction extends AnalyzeBatchActionCommon, HealthcareAction {\n /**\n * The kind of the action.\n */\n kind: \"Healthcare\";\n}\n\n/** Options for a sentiment analysis batch action. */\nexport interface SentimentAnalysisBatchAction\n extends AnalyzeBatchActionCommon,\n SentimentAnalysisAction {\n /**\n * The kind of the action.\n */\n kind: \"SentimentAnalysis\";\n}\n\n/** Options for an extractive summarization batch action. */\nexport interface ExtractiveSummarizationBatchAction\n extends AnalyzeBatchActionCommon,\n ExtractiveSummarizationAction {\n /**\n * The kind of the action.\n */\n kind: \"ExtractiveSummarization\";\n}\n\n/** Options for an abstractive summarization batch action. */\nexport interface AbstractiveSummarizationBatchAction\n extends AnalyzeBatchActionCommon,\n AbstractiveSummarizationAction {\n /**\n * The kind of the action.\n */\n kind: \"AbstractiveSummarization\";\n}\n\n/** Options for a custom entity recognition batch action. */\nexport interface CustomEntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n CustomEntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomEntityRecognition\";\n}\n\n/** Options for a custom single-label classification batch action. */\nexport interface CustomSingleLabelClassificationBatchAction\n extends AnalyzeBatchActionCommon,\n CustomSingleLabelClassificationAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomSingleLabelClassification\";\n}\n\n/** Options for a custom multi-label classification batch action. */\nexport interface CustomMultiLabelClassificationBatchAction\n extends AnalyzeBatchActionCommon,\n CustomMultiLabelClassificationAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomMultiLabelClassification\";\n}\n\n/**\n * Batch of actions.\n */\nexport type AnalyzeBatchAction =\n | EntityLinkingBatchAction\n | EntityRecognitionBatchAction\n | KeyPhraseExtractionBatchAction\n | PiiEntityRecognitionBatchAction\n | HealthcareBatchAction\n | SentimentAnalysisBatchAction\n | ExtractiveSummarizationBatchAction\n | AbstractiveSummarizationBatchAction\n | CustomEntityRecognitionBatchAction\n | CustomSingleLabelClassificationBatchAction\n | CustomMultiLabelClassificationBatchAction;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.\n */\nexport type AnalyzeBatchActionName = keyof typeof AnalyzeBatchActionNames;\n\n/** The State of a batched action */\nexport interface BatchActionState<Kind extends AnalyzeBatchActionName> {\n /**\n * The kind of the action results.\n */\n readonly kind: Kind;\n /**\n * The name of the action.\n */\n readonly actionName?: string;\n /**\n * Action statistics.\n */\n readonly statistics?: TextDocumentBatchStatistics;\n}\n\n/**\n * Action metadata.\n */\nexport interface ActionMetadata {\n /**\n * The model version used to perform the action.\n */\n readonly modelVersion: string;\n}\n\n/**\n * Custom action metadata.\n */\nexport interface CustomActionMetadata {\n /**\n * The name of the project used to perform the action.\n */\n readonly projectName: string;\n /**\n * The name of the deployment used to perform the action.\n */\n readonly deploymentName: string;\n}\n\n/**\n * Document results with potentially automatically detected language.\n */\nexport type WithDetectedLanguage<T> = T &\n DocumentDetectedLanguage & {\n /** Indicates whether the default language hint was used */\n isLanguageDefaulted?: boolean;\n };\n\n/**\n * The state of a succeeded batched action.\n */\nexport interface BatchActionSuccessResult<T, Kind extends AnalyzeBatchActionName>\n extends BatchActionState<Kind> {\n /**\n * The list of document results.\n */\n readonly results: WithDetectedLanguage<T>[];\n /**\n * When this action was completed by the service.\n */\n readonly completedOn: Date;\n /**\n * Discriminant to determine if that this is an error result.\n */\n readonly error?: undefined;\n}\n\n/**\n * The error of an analyze batch action.\n */\nexport interface BatchActionErrorResult<Kind extends AnalyzeBatchActionName>\n extends BatchActionState<Kind> {\n /**\n * When this action was completed by the service.\n */\n readonly failedOn: Date;\n /**\n * The Error for this action result.\n */\n readonly error: TextAnalysisError;\n}\n\n/**\n * The result of a batched action.\n */\nexport type BatchActionResult<T, Kind extends AnalyzeBatchActionName> =\n | BatchActionSuccessResult<T, Kind>\n | BatchActionErrorResult<Kind>;\n\n/**\n * The result of an entity linking batch action.\n */\nexport type EntityLinkingBatchResult = ActionMetadata &\n BatchActionResult<EntityLinkingResult, \"EntityLinking\">;\n\n/**\n * The result of an entity recognition batch action.\n */\nexport type EntityRecognitionBatchResult = ActionMetadata &\n BatchActionResult<EntityRecognitionResult, \"EntityRecognition\">;\n\n/**\n * The result of a key phrase extraction batch action.\n */\nexport type KeyPhraseExtractionBatchResult = ActionMetadata &\n BatchActionResult<KeyPhraseExtractionResult, \"KeyPhraseExtraction\">;\n\n/**\n * The result of a pii entity recognition batch action.\n */\nexport type PiiEntityRecognitionBatchResult = ActionMetadata &\n BatchActionResult<PiiEntityRecognitionResult, \"PiiEntityRecognition\">;\n\n/**\n * The result of a sentiment analysis batch action.\n */\nexport type SentimentAnalysisBatchResult = ActionMetadata &\n BatchActionResult<SentimentAnalysisResult, \"SentimentAnalysis\">;\n\n/**\n * The result of a healthcare batch action.\n */\nexport type HealthcareBatchResult = ActionMetadata &\n BatchActionResult<HealthcareResult, \"Healthcare\">;\n\n/**\n * The result of an extractive summarization batch action.\n */\nexport type ExtractiveSummarizationBatchResult = ActionMetadata &\n BatchActionResult<ExtractiveSummarizationResult, \"ExtractiveSummarization\">;\n\n/**\n * The result of an abstractive summarization batch action.\n */\nexport type AbstractiveSummarizationBatchResult = ActionMetadata &\n BatchActionResult<AbstractiveSummarizationResult, \"AbstractiveSummarization\">;\n\n/**\n * The result of a custom entity recognition batch action.\n */\nexport type CustomEntityRecognitionBatchResult = CustomActionMetadata &\n BatchActionResult<CustomEntityRecognitionResult, \"CustomEntityRecognition\">;\n\n/**\n * The result of a custom single-label classification batch action.\n */\nexport type CustomSingleLabelClassificationBatchResult = CustomActionMetadata &\n BatchActionResult<CustomSingleLabelClassificationResult, \"CustomSingleLabelClassification\">;\n\n/**\n * The result of a custom multi-label classification batch action.\n */\nexport type CustomMultiLabelClassificationBatchResult = CustomActionMetadata &\n BatchActionResult<CustomMultiLabelClassificationResult, \"CustomMultiLabelClassification\">;\n/**\n * Results of a batch of actions.\n */\nexport type AnalyzeBatchResult =\n | EntityLinkingBatchResult\n | EntityRecognitionBatchResult\n | KeyPhraseExtractionBatchResult\n | PiiEntityRecognitionBatchResult\n | SentimentAnalysisBatchResult\n | HealthcareBatchResult\n | ExtractiveSummarizationBatchResult\n | AbstractiveSummarizationBatchResult\n | CustomEntityRecognitionBatchResult\n | CustomSingleLabelClassificationBatchResult\n | CustomMultiLabelClassificationBatchResult;\n\n/**\n * An error result from a sentiment analysis action on a single document.\n */\nexport type SentimentAnalysisErrorResult = TextAnalysisErrorResult;\n\n/**\n * Paged results of the {@link TextAnalysisClient.beginAnalyzeBatch} operation.\n */\nexport type PagedAnalyzeBatchResult = PagedAsyncIterableIterator<AnalyzeBatchResult>;\n\n/**\n * A poller that polls long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.\n */\nexport type AnalyzeBatchPoller = PollerLike<AnalyzeBatchOperationState, PagedAnalyzeBatchResult>;\n\n/**\n * The metadata for long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.\n */\nexport interface AnalyzeBatchOperationMetadata {\n /**\n * The date and time the operation was created.\n */\n readonly createdOn: Date;\n /**\n * The date and time when the operation results will expire on the server.\n */\n readonly expiresOn?: Date;\n /**\n * The operation id.\n */\n readonly id: string;\n /**\n * The time the operation status was last updated.\n */\n readonly modifiedOn: Date;\n /**\n * Number of successfully completed actions.\n */\n readonly actionSucceededCount: number;\n /**\n * Number of failed actions.\n */\n readonly actionFailedCount: number;\n /**\n * Number of actions still in progress.\n */\n readonly actionInProgressCount: number;\n /**\n * The operation's display name.\n */\n readonly displayName?: string;\n}\n\n/**\n * The state of the begin analyze polling operation.\n */\nexport interface AnalyzeBatchOperationState\n extends OperationState<PagedAnalyzeBatchResult>,\n AnalyzeBatchOperationMetadata {}\n\n/**\n * Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with.\n */\nexport interface PollerLike<TState extends OperationState<TResult>, TResult>\n extends SimplePollerLike<TState, TResult> {\n /**\n * sends a cancellation request.\n */\n sendCancellationRequest: () => Promise<void>;\n}\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAmBL,cAAc,EACd,mBAAmB,GAcpB,MAAM,aAAa,CAAC;AA0DrB;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,aAAa,EAAE,eAAe;IAC9B,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,oBAAoB,EAAE,sBAAsB;IAC5C,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;CAC9B,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;IACtC,oBAAoB,EAAE,sBAAsB;IAC5C,mBAAmB,EAAE,qBAAqB;IAC1C,aAAa,EAAE,eAAe;IAC9B,UAAU,EAAE,YAAY;IACxB,uBAAuB,EAAE,yBAAyB;IAClD,wBAAwB,EAAE,0BAA0B;IACpD,uBAAuB,EAAE,yBAAyB;IAClD,+BAA+B,EAAE,iCAAiC;IAClE,8BAA8B,EAAE,gCAAgC;CACxD,CAAC;AA2CX;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,mCAAQ,cAAc,GAAK,mBAAmB,CAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n AbstractiveSummary,\n AssessmentSentiment,\n ClassificationCategory,\n CustomEntityRecognitionAction,\n CustomMultiLabelClassificationAction,\n CustomSingleLabelClassificationAction,\n DetectedLanguage,\n DocumentSentimentLabel,\n DocumentWarning,\n Entity,\n EntityDataSource,\n EntityLinkingAction,\n EntityRecognitionAction,\n ExtractiveSummarizationAction,\n HealthcareAction,\n HealthcareAssertion,\n HealthcareEntityCategory,\n KeyPhraseExtractionAction,\n KnownErrorCode,\n KnownInnerErrorCode,\n LanguageDetectionAction,\n LinkedEntity,\n PiiEntityRecognitionAction,\n RelationType,\n SentenceSentimentLabel,\n SentimentAnalysisAction,\n SentimentConfidenceScores,\n StringIndexType,\n SummarySentence,\n TargetConfidenceScores,\n TextDocumentBatchStatistics,\n TextDocumentStatistics,\n TokenSentimentLabel,\n} from \"./generated\";\nimport { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport { OperationState, SimplePollerLike } from \"@azure/core-lro\";\nimport { PagedAsyncIterableIterator } from \"@azure/core-paging\";\n\n/**\n * Configuration options for {@link TextAnalysisClient}.\n */\nexport interface TextAnalysisClientOptions extends CommonClientOptions {\n /**\n * The default country hint to use. Defaults to \"us\".\n */\n defaultCountryHint?: string;\n\n /**\n * The default language to use. Defaults to \"en\".\n */\n defaultLanguage?: string;\n /**\n * The version of the Cognitive Language Service API to use.\n */\n serviceVersion?: string;\n}\n\n/**\n * Options common to all operations.\n */\nexport interface TextAnalysisOperationOptions extends OperationOptions {\n /**\n * If set to true, response will contain input and document level statistics.\n */\n includeStatistics?: boolean;\n}\n\n/**\n * Options for the begin analyze actions operation.\n */\nexport interface BeginAnalyzeBatchOptions extends TextAnalysisOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n /**\n * The operation's display name.\n */\n displayName?: string;\n}\n\n/**\n * Options for the begin analyze actions operation.\n */\nexport interface RestoreAnalyzeBatchPollerOptions extends TextAnalysisOperationOptions {\n /**\n * Time delay between poll requests, in milliseconds.\n */\n updateIntervalInMs?: number;\n}\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.analyze} method.\n */\nexport const AnalyzeActionNames = {\n EntityLinking: \"EntityLinking\",\n EntityRecognition: \"EntityRecognition\",\n KeyPhraseExtraction: \"KeyPhraseExtraction\",\n PiiEntityRecognition: \"PiiEntityRecognition\",\n LanguageDetection: \"LanguageDetection\",\n SentimentAnalysis: \"SentimentAnalysis\",\n} as const;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.\n */\nexport const AnalyzeBatchActionNames = {\n SentimentAnalysis: \"SentimentAnalysis\",\n EntityRecognition: \"EntityRecognition\",\n PiiEntityRecognition: \"PiiEntityRecognition\",\n KeyPhraseExtraction: \"KeyPhraseExtraction\",\n EntityLinking: \"EntityLinking\",\n Healthcare: \"Healthcare\",\n ExtractiveSummarization: \"ExtractiveSummarization\",\n AbstractiveSummarization: \"AbstractiveSummarization\",\n CustomEntityRecognition: \"CustomEntityRecognition\",\n CustomSingleLabelClassification: \"CustomSingleLabelClassification\",\n CustomMultiLabelClassification: \"CustomMultiLabelClassification\",\n} as const;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.analyze} method.\n */\nexport type AnalyzeActionName = keyof typeof AnalyzeActionNames;\n\n/**\n * The type of parameters for every action in ${@link AnalyzeActionNames}.\n */\nexport type AnalyzeActionParameters<ActionName extends AnalyzeActionName> = {\n EntityLinking: EntityLinkingAction;\n EntityRecognition: EntityRecognitionAction;\n PiiEntityRecognition: PiiEntityRecognitionAction;\n KeyPhraseExtraction: KeyPhraseExtractionAction;\n SentimentAnalysis: SentimentAnalysisAction;\n LanguageDetection: LanguageDetectionAction;\n}[ActionName];\n\n/**\n * The type of results of every action in ${@link AnalyzeActionNames}.\n */\nexport type AnalyzeResult<ActionName extends AnalyzeActionName> = {\n EntityLinking: EntityLinkingResult[];\n EntityRecognition: EntityRecognitionResult[];\n PiiEntityRecognition: PiiEntityRecognitionResult[];\n KeyPhraseExtraction: KeyPhraseExtractionResult[];\n SentimentAnalysis: SentimentAnalysisResult[];\n LanguageDetection: LanguageDetectionResult[];\n}[ActionName];\n\n/** Options for an Abstractive Summarization action. */\nexport interface AbstractiveSummarizationAction {\n /** The approximate number of sentences to be part of the summary. */\n sentenceCount?: number;\n /**\n * Specifies the measurement unit used to calculate the offset and length properties. For a list of possible values, see {@link KnownStringIndexType}.\n *\n * The default is the JavaScript's default which is \"Utf16CodeUnit\".\n */\n stringIndexType?: StringIndexType;\n}\n\n/**\n * Enum of possible error codes of a {@link TextAnalysisError}.\n */\nexport const KnownTextAnalysisErrorCode = { ...KnownErrorCode, ...KnownInnerErrorCode };\n\n/**\n * Type describing an API error.\n */\nexport interface TextAnalysisError {\n /**\n * A code describing the kind of error produced. See {@link KnownTextAnalysisErrorCode}.\n */\n readonly code: string;\n /**\n * A message from the service explaining the error\n */\n readonly message: string;\n /**\n * The target of the particular error (for example, the name of an invalid parameter)\n */\n readonly target?: string;\n}\n\n/**\n * Base type for results of an action corresponding to a single input document.\n */\nexport interface TextAnalysisSuccessResult {\n /**\n * Unique, non-empty document identifier.\n */\n readonly id: string;\n\n /**\n * Statistics about the input document and how it was processed by the service.\n * This property will have a value when includeStatistics is set to true in\n * the client call.\n */\n readonly statistics?: TextDocumentStatistics;\n\n /**\n * An array of warning data corresponding to this document.\n *\n * If no warnings were returned, this array will be empty.\n */\n readonly warnings: DocumentWarning[];\n\n /**\n * Discriminant to determine if this is an error result.\n */\n readonly error?: undefined;\n}\n\n/**\n * Base type for error results of an action corresponding to a single document.\n */\nexport interface TextAnalysisErrorResult {\n /**\n * Unique, non-empty document identifier.\n */\n readonly id: string;\n\n /**\n * The Error for this document result.\n */\n readonly error: TextAnalysisError;\n}\n\n/**\n * The result of an entity recognition action on a single document.\n */\nexport type EntityRecognitionResult = EntityRecognitionSuccessResult | EntityRecognitionErrorResult;\n\n/**\n * The result of an entity recognition action on a single document, containing\n * a collection of {@link Entity} objects identified in that document.\n */\nexport interface EntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n}\n\n/**\n * An error result from an entity recognition action on a single document.\n */\nexport type EntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of an entity recognition action on a single document.\n */\nexport type PiiEntityRecognitionResult =\n | PiiEntityRecognitionSuccessResult\n | PiiEntityRecognitionErrorResult;\n\n/**\n * The result of a pii entity recognition action on a single document,\n * containing the collection of {@link Entity} objects identified in that\n * document.\n */\nexport interface PiiEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n /**\n * The text redacted.\n */\n readonly redactedText: string;\n}\n\n/**\n * An error result from a pii entity recognition action on a single document.\n */\nexport type PiiEntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of an entity linking action on a single document.\n */\nexport type EntityLinkingResult = EntityLinkingSuccessResult | EntityLinkingErrorResult;\n\n/**\n * The result of a entity linking action on a single document, containing a\n * collection of the {@link LinkedEntity} objects identified in that document.\n */\nexport interface EntityLinkingSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: LinkedEntity[];\n}\n\n/**\n * An error result from an entity linking action on a single document.\n */\nexport type EntityLinkingErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a language detection action on a single document.\n */\nexport type LanguageDetectionResult = LanguageDetectionSuccessResult | LanguageDetectionErrorResult;\n\n/**\n * The result of a language detection action on a single document,\n * containing a prediction of what language the document is written in.\n */\nexport interface LanguageDetectionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The top detected language by confidence score.\n */\n readonly primaryLanguage: DetectedLanguage;\n}\n\n/**\n * An error result from a language detection action on a single document.\n */\nexport type LanguageDetectionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document.\n */\nexport type KeyPhraseExtractionResult =\n | KeyPhraseExtractionSuccessResult\n | KeyPhraseExtractionErrorResult;\n\n/**\n * The result of a key phrase extraction action on a single document,\n * containing a collection of the key phrases identified in that document.\n */\nexport interface KeyPhraseExtractionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of representative words or phrases. The number of key phrases\n * returned is proportional to the number of words in the input document.\n */\n readonly keyPhrases: string[];\n}\n\n/**\n * An error result from a key phrase extraction action on a single document.\n */\nexport type KeyPhraseExtractionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document.\n */\nexport type SentimentAnalysisResult = SentimentAnalysisSuccessResult | SentimentAnalysisErrorResult;\n\n/**\n * The result of a sentiment analysis action on a single document,\n * containing the predicted sentiment for each sentence as well as for the full\n * document.\n */\nexport interface SentimentAnalysisSuccessResult extends TextAnalysisSuccessResult {\n /**\n * Predicted sentiment for document. For a list of possible values, see {@link DocumentSentimentLabel}\n */\n readonly sentiment: DocumentSentimentLabel;\n /**\n * Document level sentiment confidence scores between 0 and 1 for each\n * sentiment class.\n */\n readonly confidenceScores: SentimentConfidenceScores;\n /**\n * The predicted sentiment for each sentence in the corresponding document.\n */\n readonly sentences: SentenceSentiment[];\n}\n\n/**\n * The predicted sentiment for a given span of text. For more information\n * regarding text sentiment, see {@link https://docs.microsoft.com//azure/cognitive-services/language-service/sentiment-opinion-mining/overview}.\n */\nexport interface SentenceSentiment {\n /**\n * The sentence text.\n */\n readonly text: string;\n /**\n * The predicted Sentiment for the sentence. For a list of possible values,\n * see {@link SentenceSentimentLabel}\n */\n readonly sentiment: SentenceSentimentLabel;\n /**\n * The sentiment confidence score between 0 and 1 for the sentence for all\n * classes.\n */\n readonly confidenceScores: SentimentConfidenceScores;\n /**\n * The sentence text offset from the start of the document.\n */\n readonly offset: number;\n /**\n * The length of the sentence text.\n */\n readonly length: number;\n /**\n * The list of opinions mined from this sentence. For example in \"The food is\n * good, but the service is bad\", the following two opinions will be returned:\n * \"food is good\" and \"service is bad\".\n *\n * It is non-empty only returned if {@link includeOpinionMining} was set to\n * `true`.\n */\n readonly opinions: Opinion[];\n}\n\n/**\n * TargetSentiment contains the predicted sentiment, confidence scores and other\n * information about a target of a product. A target of a product/service is a\n * key component of that product/service. For example in \"The food at Hotel Foo\n * is good\", \"food\" is a target of \"Hotel Foo\".\n */\nexport interface TargetSentiment {\n /**\n * The sentiment confidence score between 0 and 1 for the target for\n * 'positive' and 'negative' labels.\n */\n readonly confidenceScores: TargetConfidenceScores;\n /**\n * The predicted Sentiment for the Target. For a list of possible values,\n * see {@link TokenSentimentLabel}\n */\n readonly sentiment: TokenSentimentLabel;\n /**\n * The target text.\n */\n readonly text: string;\n /**\n * The Target text offset from the start of the sentence.\n */\n readonly offset: number;\n /**\n * The length of the Target text.\n */\n readonly length: number;\n}\n\n/**\n * A mined opinion object represents an opinion we've extracted from a sentence.\n * It consists of both a target that these assessments are about, and the actual\n * assessments themselves.\n */\nexport interface Opinion {\n /**\n * The target of a product/service that this assessment is about.\n */\n readonly target: TargetSentiment;\n /**\n * The actual assessments of the target.\n */\n readonly assessments: AssessmentSentiment[];\n}\n\n/**\n * A healthcare entity represented as a node in a directed graph where the edges are\n * a particular type of relationship between the source and target nodes.\n */\nexport interface HealthcareEntity extends Entity {\n /**\n * Normalized name for the entity. For example, the normalized text for \"histologically\" is \"histologic\".\n */\n readonly normalizedText?: string;\n /**\n * Whether the entity is negated.\n */\n readonly assertion?: HealthcareAssertion;\n /**\n * Entity references in known data sources.\n */\n readonly dataSources: EntityDataSource[];\n /**\n * Defines values for HealthcareEntityCategory.\n * {@link KnownHealthcareEntityCategory} can be used interchangeably with HealthcareEntityCategory,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **BODY_STRUCTURE**\n * **AGE**\n * **GENDER**\n * **EXAMINATION_NAME**\n * **DATE**\n * **DIRECTION**\n * **FREQUENCY**\n * **MEASUREMENT_VALUE**\n * **MEASUREMENT_UNIT**\n * **RELATIONAL_OPERATOR**\n * **TIME**\n * **GENE_OR_PROTEIN**\n * **VARIANT**\n * **ADMINISTRATIVE_EVENT**\n * **CARE_ENVIRONMENT**\n * **HEALTHCARE_PROFESSION**\n * **DIAGNOSIS**\n * **SYMPTOM_OR_SIGN**\n * **CONDITION_QUALIFIER**\n * **MEDICATION_CLASS**\n * **MEDICATION_NAME**\n * **DOSAGE**\n * **MEDICATION_FORM**\n * **MEDICATION_ROUTE**\n * **FAMILY_RELATION**\n * **TREATMENT_NAME**\n */\n readonly category: HealthcareEntityCategory;\n}\n\n/**\n * The type of different roles a healthcare entity can play in a relation.\n */\nexport type HealthcareEntityRelationRoleType = string;\n\n/**\n * A healthcare entity that plays a specific role in a relation.\n */\nexport interface HealthcareEntityRelationRole {\n /**\n * A healthcare entity\n */\n readonly entity: HealthcareEntity;\n /**\n * The role of the healthcare entity in a particular relation.\n */\n readonly name: HealthcareEntityRelationRoleType;\n}\n\n/**\n * A relationship between two or more healthcare entities.\n */\nexport interface HealthcareEntityRelation {\n /**\n * The type of the healthcare relation.\n */\n readonly relationType: RelationType;\n /**\n * The list of healthcare entities and their roles in the healthcare relation.\n */\n readonly roles: HealthcareEntityRelationRole[];\n /**\n * The confidence score between 0 and 1 of the extracted relation.\n */\n readonly confidenceScore?: number;\n}\n\n/**\n * The results of a successful healthcare analysis action for a single document.\n */\nexport interface HealthcareSuccessResult extends TextAnalysisSuccessResult {\n /**\n * Healthcare entities.\n */\n readonly entities: HealthcareEntity[];\n /**\n * Relations between healthcare entities.\n */\n readonly entityRelations: HealthcareEntityRelation[];\n}\n\n/**\n * An error result from the healthcare analysis action on a single document.\n */\nexport type HealthcareErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the healthcare analysis action on a single document.\n */\nexport type HealthcareResult = HealthcareSuccessResult | HealthcareErrorResult;\n\n/**\n * The result of the extractive summarization action on a single document.\n */\nexport type ExtractiveSummarizationResult =\n | ExtractiveSummarizationSuccessResult\n | ExtractiveSummarizationErrorResult;\n\n/**\n * The result of the extractive summarization action on a single document,\n * containing a collection of the summary identified in that document.\n */\nexport interface ExtractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of sentences composing a summary of the input document.\n */\n readonly sentences: SummarySentence[];\n}\n\n/**\n * An error result from the extractive summarization action on a single document.\n */\nexport type ExtractiveSummarizationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the abstractive summarization action on a single document.\n */\nexport type AbstractiveSummarizationResult =\n | AbstractiveSummarizationSuccessResult\n | AbstractiveSummarizationErrorResult;\n\n/**\n * The result of the abstractive summarization action on a single document,\n * containing a collection of the summaries identified for that document.\n */\nexport interface AbstractiveSummarizationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * A list of summaries of the input document.\n */\n readonly summaries: AbstractiveSummary[];\n}\n\n/**\n * An error result from the abstractive summarization action on a single document.\n */\nexport type AbstractiveSummarizationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the custom entity recognition action on a single document.\n */\nexport type CustomEntityRecognitionResult =\n | CustomEntityRecognitionSuccessResult\n | CustomEntityRecognitionErrorResult;\n\n/**\n * The result of the custom entity recognition action on a single document,\n * containing a collection of the entities identified in that document.\n */\nexport interface CustomEntityRecognitionSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: Entity[];\n}\n\n/**\n * An error result from the custom entity recognition action on a single document.\n */\nexport type CustomEntityRecognitionErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the single-label classification action on a single document.\n */\nexport type CustomSingleLabelClassificationResult =\n | CustomSingleLabelClassificationSuccessResult\n | CustomSingleLabelClassificationErrorResult;\n\n/**\n * The result of a successful single-label classification action on a single document,\n * containing the result of the classification.\n */\nexport interface CustomSingleLabelClassificationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of classifications in the input document.\n */\n readonly classifications: ClassificationCategory[];\n}\n\n/**\n * An error result from the single-label classification action on a single document.\n */\nexport type CustomSingleLabelClassificationErrorResult = TextAnalysisErrorResult;\n\n/**\n * The result of the multi-label classification action on a multi document.\n */\nexport type CustomMultiLabelClassificationResult =\n | CustomMultiLabelClassificationSuccessResult\n | CustomMultiLabelClassificationErrorResult;\n\n/**\n * The result of a successful multi-label classification action on a multi document,\n * containing the result of the classification.\n */\nexport interface CustomMultiLabelClassificationSuccessResult extends TextAnalysisSuccessResult {\n /**\n * The collection of classifications in the input document.\n */\n readonly classifications: ClassificationCategory[];\n}\n\n/**\n * An error result from the multi-label classification action on a multi document.\n */\nexport type CustomMultiLabelClassificationErrorResult = TextAnalysisErrorResult;\n\n/**\n * Options common to all batch actions.\n */\nexport interface AnalyzeBatchActionCommon {\n /**\n * The name of the action.\n */\n actionName?: string;\n}\n\n/** Options for an entity linking batch action. */\nexport interface EntityLinkingBatchAction extends AnalyzeBatchActionCommon, EntityLinkingAction {\n /**\n * The kind of the action.\n */\n kind: \"EntityLinking\";\n}\n\n/** Options for an entity recognition batch action. */\nexport interface EntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n EntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"EntityRecognition\";\n}\n\n/** Options for an key phrase extraction batch action. */\nexport interface KeyPhraseExtractionBatchAction\n extends AnalyzeBatchActionCommon,\n KeyPhraseExtractionAction {\n /**\n * The kind of the action.\n */\n kind: \"KeyPhraseExtraction\";\n}\n\n/** Options for a pii entity recognition batch action. */\nexport interface PiiEntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n PiiEntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"PiiEntityRecognition\";\n}\n\n/** Options for a healthcare batch action. */\nexport interface HealthcareBatchAction extends AnalyzeBatchActionCommon, HealthcareAction {\n /**\n * The kind of the action.\n */\n kind: \"Healthcare\";\n}\n\n/** Options for a sentiment analysis batch action. */\nexport interface SentimentAnalysisBatchAction\n extends AnalyzeBatchActionCommon,\n SentimentAnalysisAction {\n /**\n * The kind of the action.\n */\n kind: \"SentimentAnalysis\";\n}\n\n/** Options for an extractive summarization batch action. */\nexport interface ExtractiveSummarizationBatchAction\n extends AnalyzeBatchActionCommon,\n ExtractiveSummarizationAction {\n /**\n * The kind of the action.\n */\n kind: \"ExtractiveSummarization\";\n}\n\n/** Options for an abstractive summarization batch action. */\nexport interface AbstractiveSummarizationBatchAction\n extends AnalyzeBatchActionCommon,\n AbstractiveSummarizationAction {\n /**\n * The kind of the action.\n */\n kind: \"AbstractiveSummarization\";\n}\n\n/** Options for a custom entity recognition batch action. */\nexport interface CustomEntityRecognitionBatchAction\n extends AnalyzeBatchActionCommon,\n CustomEntityRecognitionAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomEntityRecognition\";\n}\n\n/** Options for a custom single-label classification batch action. */\nexport interface CustomSingleLabelClassificationBatchAction\n extends AnalyzeBatchActionCommon,\n CustomSingleLabelClassificationAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomSingleLabelClassification\";\n}\n\n/** Options for a custom multi-label classification batch action. */\nexport interface CustomMultiLabelClassificationBatchAction\n extends AnalyzeBatchActionCommon,\n CustomMultiLabelClassificationAction {\n /**\n * The kind of the action.\n */\n kind: \"CustomMultiLabelClassification\";\n}\n\n/**\n * Batch of actions.\n */\nexport type AnalyzeBatchAction =\n | EntityLinkingBatchAction\n | EntityRecognitionBatchAction\n | KeyPhraseExtractionBatchAction\n | PiiEntityRecognitionBatchAction\n | HealthcareBatchAction\n | SentimentAnalysisBatchAction\n | ExtractiveSummarizationBatchAction\n | AbstractiveSummarizationBatchAction\n | CustomEntityRecognitionBatchAction\n | CustomSingleLabelClassificationBatchAction\n | CustomMultiLabelClassificationBatchAction;\n\n/**\n * Type of actions supported by the {@link TextAnalysisClient.beginAnalyzeBatch} method.\n */\nexport type AnalyzeBatchActionName = keyof typeof AnalyzeBatchActionNames;\n\n/** The State of a batched action */\nexport interface BatchActionState<Kind extends AnalyzeBatchActionName> {\n /**\n * The kind of the action results.\n */\n readonly kind: Kind;\n /**\n * The name of the action.\n */\n readonly actionName?: string;\n /**\n * Action statistics.\n */\n readonly statistics?: TextDocumentBatchStatistics;\n}\n\n/**\n * Action metadata.\n */\nexport interface ActionMetadata {\n /**\n * The model version used to perform the action.\n */\n readonly modelVersion: string;\n}\n\n/**\n * Custom action metadata.\n */\nexport interface CustomActionMetadata {\n /**\n * The name of the project used to perform the action.\n */\n readonly projectName: string;\n /**\n * The name of the deployment used to perform the action.\n */\n readonly deploymentName: string;\n}\n\n/**\n * The state of a succeeded batched action.\n */\nexport interface BatchActionSuccessResult<T, Kind extends AnalyzeBatchActionName>\n extends BatchActionState<Kind> {\n /**\n * The list of document results.\n */\n readonly results: T[];\n /**\n * When this action was completed by the service.\n */\n readonly completedOn: Date;\n /**\n * Discriminant to determine if that this is an error result.\n */\n readonly error?: undefined;\n}\n\n/**\n * The error of an analyze batch action.\n */\nexport interface BatchActionErrorResult<Kind extends AnalyzeBatchActionName>\n extends BatchActionState<Kind> {\n /**\n * When this action was completed by the service.\n */\n readonly failedOn: Date;\n /**\n * The Error for this action result.\n */\n readonly error: TextAnalysisError;\n}\n\n/**\n * The result of a batched action.\n */\nexport type BatchActionResult<T, Kind extends AnalyzeBatchActionName> =\n | BatchActionSuccessResult<T, Kind>\n | BatchActionErrorResult<Kind>;\n\n/**\n * The result of an entity linking batch action.\n */\nexport type EntityLinkingBatchResult = ActionMetadata &\n BatchActionResult<EntityLinkingResult, \"EntityLinking\">;\n\n/**\n * The result of an entity recognition batch action.\n */\nexport type EntityRecognitionBatchResult = ActionMetadata &\n BatchActionResult<EntityRecognitionResult, \"EntityRecognition\">;\n\n/**\n * The result of a key phrase extraction batch action.\n */\nexport type KeyPhraseExtractionBatchResult = ActionMetadata &\n BatchActionResult<KeyPhraseExtractionResult, \"KeyPhraseExtraction\">;\n\n/**\n * The result of a pii entity recognition batch action.\n */\nexport type PiiEntityRecognitionBatchResult = ActionMetadata &\n BatchActionResult<PiiEntityRecognitionResult, \"PiiEntityRecognition\">;\n\n/**\n * The result of a sentiment analysis batch action.\n */\nexport type SentimentAnalysisBatchResult = ActionMetadata &\n BatchActionResult<SentimentAnalysisResult, \"SentimentAnalysis\">;\n\n/**\n * The result of a healthcare batch action.\n */\nexport type HealthcareBatchResult = ActionMetadata &\n BatchActionResult<HealthcareResult, \"Healthcare\">;\n\n/**\n * The result of an extractive summarization batch action.\n */\nexport type ExtractiveSummarizationBatchResult = ActionMetadata &\n BatchActionResult<ExtractiveSummarizationResult, \"ExtractiveSummarization\">;\n\n/**\n * The result of an abstractive summarization batch action.\n */\nexport type AbstractiveSummarizationBatchResult = ActionMetadata &\n BatchActionResult<AbstractiveSummarizationResult, \"AbstractiveSummarization\">;\n\n/**\n * The result of a custom entity recognition batch action.\n */\nexport type CustomEntityRecognitionBatchResult = CustomActionMetadata &\n BatchActionResult<CustomEntityRecognitionResult, \"CustomEntityRecognition\">;\n\n/**\n * The result of a custom single-label classification batch action.\n */\nexport type CustomSingleLabelClassificationBatchResult = CustomActionMetadata &\n BatchActionResult<CustomSingleLabelClassificationResult, \"CustomSingleLabelClassification\">;\n\n/**\n * The result of a custom multi-label classification batch action.\n */\nexport type CustomMultiLabelClassificationBatchResult = CustomActionMetadata &\n BatchActionResult<CustomMultiLabelClassificationResult, \"CustomMultiLabelClassification\">;\n/**\n * Results of a batch of actions.\n */\nexport type AnalyzeBatchResult =\n | EntityLinkingBatchResult\n | EntityRecognitionBatchResult\n | KeyPhraseExtractionBatchResult\n | PiiEntityRecognitionBatchResult\n | SentimentAnalysisBatchResult\n | HealthcareBatchResult\n | ExtractiveSummarizationBatchResult\n | AbstractiveSummarizationBatchResult\n | CustomEntityRecognitionBatchResult\n | CustomSingleLabelClassificationBatchResult\n | CustomMultiLabelClassificationBatchResult;\n\n/**\n * An error result from a sentiment analysis action on a single document.\n */\nexport type SentimentAnalysisErrorResult = TextAnalysisErrorResult;\n\n/**\n * Paged results of the {@link TextAnalysisClient.beginAnalyzeBatch} operation.\n */\nexport type PagedAnalyzeBatchResult = PagedAsyncIterableIterator<AnalyzeBatchResult>;\n\n/**\n * A poller that polls long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.\n */\nexport type AnalyzeBatchPoller = PollerLike<AnalyzeBatchOperationState, PagedAnalyzeBatchResult>;\n\n/**\n * The metadata for long-running operations started by {@link TextAnalysisClient.beginAnalyzeBatch}.\n */\nexport interface AnalyzeBatchOperationMetadata {\n /**\n * The date and time the operation was created.\n */\n readonly createdOn: Date;\n /**\n * The date and time when the operation results will expire on the server.\n */\n readonly expiresOn?: Date;\n /**\n * The operation id.\n */\n readonly id: string;\n /**\n * The time the operation status was last updated.\n */\n readonly modifiedOn: Date;\n /**\n * Number of successfully completed actions.\n */\n readonly actionSucceededCount: number;\n /**\n * Number of failed actions.\n */\n readonly actionFailedCount: number;\n /**\n * Number of actions still in progress.\n */\n readonly actionInProgressCount: number;\n /**\n * The operation's display name.\n */\n readonly displayName?: string;\n}\n\n/**\n * The state of the begin analyze polling operation.\n */\nexport interface AnalyzeBatchOperationState\n extends OperationState<PagedAnalyzeBatchResult>,\n AnalyzeBatchOperationMetadata {}\n\n/**\n * Abstract representation of a poller, intended to expose just the minimal API that the user needs to work with.\n */\nexport interface PollerLike<TState extends OperationState<TResult>, TResult>\n extends SimplePollerLike<TState, TResult> {\n /**\n * sends a cancellation request.\n */\n sendCancellationRequest: () => Promise<void>;\n}\n"]}
@@ -54,9 +54,6 @@ function toSentimentAnalysisResult(docIds, results) {
54
54
  },
55
55
  });
56
56
  }
57
- function toDynamicClassificationResult(docIds, results) {
58
- return transformDocumentResults(docIds, results);
59
- }
60
57
  /**
61
58
  * Converts a sentence sentiment object returned by the service to another that
62
59
  * is user-friendly.
@@ -135,9 +132,6 @@ export function transformActionResult(actionName, docIds, response) {
135
132
  case "LanguageDetectionResults": {
136
133
  return toLanguageDetectionResult(docIds, response.results);
137
134
  }
138
- case "DynamicClassificationResults": {
139
- return toDynamicClassificationResult(docIds, response.results);
140
- }
141
135
  default: {
142
136
  const __exhaust = response;
143
137
  throw new Error(`Unsupported results kind: ${__exhaust} for an action of type ${actionName}`);
@@ -211,9 +205,9 @@ function toHealthcareResult(docIds, results) {
211
205
  }
212
206
  return transformDocumentResults(docIds, results, {
213
207
  processSuccess: (_a) => {
214
- var { entities, relations, detectedLanguage } = _a, rest = __rest(_a, ["entities", "relations", "detectedLanguage"]);
208
+ var { entities, relations } = _a, rest = __rest(_a, ["entities", "relations"]);
215
209
  const newEntities = entities.map(makeHealthcareEntity);
216
- return Object.assign(Object.assign({ entities: newEntities, entityRelations: relations.map(makeHealthcareRelation(newEntities)) }, (detectedLanguage ? { detectedLanguage: { iso6391Name: detectedLanguage } } : {})), rest);
210
+ return Object.assign({ entities: newEntities, entityRelations: relations.map(makeHealthcareRelation(newEntities)) }, rest);
217
211
  },
218
212
  });
219
213
  }
@@ -317,7 +311,7 @@ export function transformAnalyzeBatchResults(docIds, response = [], errors = [])
317
311
  }
318
312
  const { results } = actionData;
319
313
  const { modelVersion, statistics } = results;
320
- return Object.assign(Object.assign(Object.assign({ kind, results: transformDocumentResults(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
314
+ return Object.assign(Object.assign(Object.assign({ kind: "ExtractiveSummarization", results: transformDocumentResults(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
321
315
  }
322
316
  case "AbstractiveSummarizationLROResults": {
323
317
  const kind = "AbstractiveSummarization";
@@ -326,7 +320,7 @@ export function transformAnalyzeBatchResults(docIds, response = [], errors = [])
326
320
  }
327
321
  const { results } = actionData;
328
322
  const { modelVersion, statistics } = results;
329
- return Object.assign(Object.assign(Object.assign({ kind, results: transformDocumentResults(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
323
+ return Object.assign(Object.assign(Object.assign({ kind: "AbstractiveSummarization", results: transformDocumentResults(docIds, results), completedOn }, (actionName ? { actionName } : {})), (statistics ? { statistics } : {})), { modelVersion });
330
324
  }
331
325
  default: {
332
326
  throw new Error(`Unsupported results kind: ${resultKind}`);
@@ -1 +1 @@
1
- {"version":3,"file":"transforms.js","sourceRoot":"","sources":["../../src/transforms.ts"],"names":[],"mappings":"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,YAAY,EAAE,EAAE;QAChB,QAAQ;QACR,KAAK;KACgB,CAAC;AAC1B,CAAC;AACD;;;;;;;GAOG;AACH,SAAS,qBAAqB,CAC5B,IAA4B,EAC5B,KAAoC,EACpC,QAAc;IAEd,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,KAAK,CAAC,0EAA0E,CAAC,CAAC;KAC7F;IACD,OAAO;QACL,IAAI;QACJ,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,EAAE;QAClB,QAAQ;QACR,KAAK;KACgB,CAAC;AAC1B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n AbstractiveSummarizationLROResult,\n AnalyzeResponse,\n AnalyzeTextLROResultUnion,\n AssessmentSentiment,\n CustomEntityRecognitionLROResult,\n CustomMultiLabelClassificationLROResult,\n CustomSingleLabelClassificationLROResult,\n DocumentError,\n DynamicClassificationTaskResult,\n EntitiesTaskResult,\n EntityLinkingLROResult,\n EntityLinkingTaskResult,\n EntityRecognitionLROResult,\n ErrorModel,\n ErrorResponse,\n ExtractiveSummarizationLROResult,\n DynamicClassificationResult as GeneratedDynamicClassification,\n EntityLinkingResult as GeneratedEntityLinkingResult,\n EntitiesResult as GeneratedEntityRecognitionResult,\n HealthcareEntity as GeneratedHealthcareEntity,\n HealthcareResult as GeneratedHealthcareResult,\n KeyPhraseResult as GeneratedKeyPhraseExtractionResult,\n LanguageDetectionResult as GeneratedLanguageDetectionResult,\n PiiResult as GeneratedPiiEntityRecognitionResult,\n SentenceSentiment as GeneratedSentenceSentiment,\n SentimentResponse as GeneratedSentimentAnalysisResult,\n HealthcareLROResult,\n HealthcareRelation,\n HealthcareRelationEntity,\n InnerErrorModel,\n KeyPhraseExtractionLROResult,\n KeyPhraseTaskResult,\n KnownAnalyzeTextLROResultsKind,\n LanguageDetectionTaskResult,\n PiiEntityRecognitionLROResult,\n PiiTaskResult,\n SentenceTarget,\n SentimentLROResult,\n SentimentTaskResult,\n TargetRelation,\n CustomEntitiesResultDocumentsItem,\n ExtractedSummaryDocumentResultWithDetectedLanguage,\n AbstractiveSummaryDocumentResultWithDetectedLanguage,\n HealthcareEntitiesDocumentResultWithDocumentDetectedLanguage,\n CustomLabelClassificationResultDocumentsItem,\n} from \"./generated\";\nimport {\n AnalyzeActionName,\n AnalyzeBatchActionName,\n AnalyzeBatchResult,\n AnalyzeResult,\n DynamicClassificationResult,\n EntityLinkingResult,\n EntityRecognitionResult,\n HealthcareEntity,\n HealthcareEntityRelation,\n HealthcareEntityRelationRole,\n HealthcareResult,\n HealthcareSuccessResult,\n KeyPhraseExtractionResult,\n LanguageDetectionResult,\n Opinion,\n PiiEntityRecognitionResult,\n SentenceSentiment,\n SentimentAnalysisResult,\n TextAnalysisError,\n TextAnalysisErrorResult,\n TextAnalysisSuccessResult,\n WithDetectedLanguage,\n} from \"./models\";\nimport {\n AssessmentIndex,\n extractErrorPointerIndex,\n parseAssessmentIndex,\n parseHealthcareEntityIndex,\n sortResponseIdObjects,\n} from \"./util\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\n/**\n * Helper function for converting nested service error to the unified\n * TextAnalysisError\n */\nfunction toTextAnalysisError(errorModel: ErrorModel | InnerErrorModel): TextAnalysisError {\n // Return the deepest error.\n if (errorModel.innererror !== undefined) {\n return toTextAnalysisError(errorModel.innererror);\n }\n\n return {\n ...errorModel,\n };\n}\n\nfunction makeTextAnalysisErrorResult(id: string, error: ErrorModel): TextAnalysisErrorResult {\n return {\n id,\n error: toTextAnalysisError(error),\n };\n}\n\n/**\n * combines successful and erroneous results into a single array of results and\n * sort them so that the IDs order match that of the input documents array.\n * @param ids - the array of input document IDs.\n * @param response - the response received from the service.\n * @param options - an options bag that includes functions to process the results.\n */\nfunction transformDocumentResults<\n DocumentSuccess extends TextAnalysisSuccessResult,\n PublicDocumentSuccess extends TextAnalysisSuccessResult = DocumentSuccess,\n TError extends TextAnalysisErrorResult = TextAnalysisErrorResult\n>(\n ids: string[],\n response: {\n documents: DocumentSuccess[];\n errors: DocumentError[];\n },\n options?: {\n processSuccess?: (successResult: DocumentSuccess) => PublicDocumentSuccess;\n processError?: (id: string, error: ErrorModel) => TError;\n }\n): (PublicDocumentSuccess | TextAnalysisErrorResult)[] {\n const { processError = makeTextAnalysisErrorResult, processSuccess } = options || {};\n const successResults = processSuccess\n ? response.documents.map(processSuccess)\n : response.documents;\n const unsortedResults = (\n successResults as (PublicDocumentSuccess | TextAnalysisErrorResult)[]\n ).concat(response.errors.map((error) => processError(error.id, error.error)));\n\n return sortResponseIdObjects(ids, unsortedResults);\n}\n\nfunction toLanguageDetectionResult(\n docIds: string[],\n results: GeneratedLanguageDetectionResult\n): LanguageDetectionResult[] {\n return transformDocumentResults(docIds, results, {\n processSuccess: ({ detectedLanguage, ...rest }) => ({\n primaryLanguage: detectedLanguage,\n ...rest,\n }),\n });\n}\n\nfunction toPiiEntityRecognitionResult(\n docIds: string[],\n results: GeneratedPiiEntityRecognitionResult\n): PiiEntityRecognitionResult[] {\n return transformDocumentResults(docIds, results);\n}\n\nfunction toSentimentAnalysisResult(\n docIds: string[],\n results: GeneratedSentimentAnalysisResult\n): SentimentAnalysisResult[] {\n return transformDocumentResults(docIds, results, {\n processSuccess: ({ sentences, ...rest }) => ({\n ...rest,\n sentences: sentences.map((sentence) =>\n convertGeneratedSentenceSentiment(sentence, sentences)\n ),\n }),\n });\n}\n\nfunction toDynamicClassificationResult(\n docIds: string[],\n results: GeneratedDynamicClassification\n): DynamicClassificationResult[] {\n return transformDocumentResults(docIds, results);\n}\n\n/**\n * Converts a sentence sentiment object returned by the service to another that\n * is user-friendly.\n *\n * @param sentence - The sentence sentiment object to be converted.\n * @param response - The entire response returned by the service.\n * @returns The user-friendly sentence sentiment object.\n * @internal\n */\nfunction convertGeneratedSentenceSentiment(\n { targets, assessments: _, ...rest }: GeneratedSentenceSentiment,\n sentences: GeneratedSentenceSentiment[]\n): SentenceSentiment {\n return {\n ...rest,\n opinions:\n targets?.map(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n ({ relations, ...rest }: SentenceTarget): Opinion => ({\n target: rest,\n assessments: relations\n .filter((relation) => relation.relationType === \"assessment\")\n .map((relation) => convertTargetRelationToAssessmentSentiment(relation, sentences)),\n })\n ) ?? [],\n };\n}\n\n/**\n * Converts a target relation object returned by the service to an assessment\n * sentiment object where JSON pointers in the former are realized in the\n * latter.\n *\n * @param targetRelation - The target relation object to be converted.\n * @param response - The entire response returned by the service.\n * @returns The user-friendly assessment sentiment object.\n * @internal\n */\nfunction convertTargetRelationToAssessmentSentiment(\n targetRelation: TargetRelation,\n sentences: GeneratedSentenceSentiment[]\n): AssessmentSentiment {\n const assessmentPtr = targetRelation.ref;\n const assessmentIndex: AssessmentIndex = parseAssessmentIndex(assessmentPtr);\n const assessment =\n sentences?.[assessmentIndex.sentence].assessments?.[assessmentIndex.assessment];\n if (assessment !== undefined) {\n return assessment;\n } else {\n throw new Error(`Pointer \"${assessmentPtr}\" is not a valid Assessment pointer`);\n }\n}\n\nfunction toEntityLinkingResult(\n docIds: string[],\n results: GeneratedEntityLinkingResult\n): EntityLinkingResult[] {\n return transformDocumentResults(docIds, results);\n}\n\nfunction toKeyPhraseExtractionResult(\n docIds: string[],\n results: GeneratedKeyPhraseExtractionResult\n): KeyPhraseExtractionResult[] {\n return transformDocumentResults(docIds, results);\n}\n\nfunction toEntityRecognitionResult(\n docIds: string[],\n results: GeneratedEntityRecognitionResult\n): EntityRecognitionResult[] {\n return transformDocumentResults(docIds, results);\n}\n\n/**\n * @internal\n */\nexport function transformActionResult<ActionName extends AnalyzeActionName>(\n actionName: ActionName,\n docIds: string[],\n response: AnalyzeResponse\n): AnalyzeResult<AnalyzeActionName> {\n switch (response.kind) {\n case \"EntityLinkingResults\": {\n return toEntityLinkingResult(docIds, (response as EntityLinkingTaskResult).results);\n }\n case \"EntityRecognitionResults\": {\n return toEntityRecognitionResult(docIds, (response as EntitiesTaskResult).results);\n }\n case \"KeyPhraseExtractionResults\": {\n return toKeyPhraseExtractionResult(docIds, (response as KeyPhraseTaskResult).results);\n }\n case \"PiiEntityRecognitionResults\": {\n return toPiiEntityRecognitionResult(docIds, (response as PiiTaskResult).results);\n }\n case \"SentimentAnalysisResults\": {\n return toSentimentAnalysisResult(docIds, (response as SentimentTaskResult).results);\n }\n case \"LanguageDetectionResults\": {\n return toLanguageDetectionResult(docIds, (response as LanguageDetectionTaskResult).results);\n }\n case \"DynamicClassificationResults\": {\n return toDynamicClassificationResult(\n docIds,\n (response as DynamicClassificationTaskResult).results\n );\n }\n default: {\n const __exhaust: never = response;\n throw new Error(`Unsupported results kind: ${__exhaust} for an action of type ${actionName}`);\n }\n }\n}\n\nfunction appendReadableErrorMessage(currentMessage: string, innerMessage: string): string {\n let message = currentMessage;\n if (message.slice(-1) !== \".\") {\n message = message + \".\";\n }\n return message + \" \" + innerMessage;\n}\n\n/**\n * @internal\n * parses incoming errors from the service/\n * @param error - the incoming error\n */\nfunction transformError(errorResponse: unknown): any {\n const strongErrorResponse = errorResponse as {\n response: {\n parsedBody?: ErrorResponse;\n };\n statusCode: number;\n };\n if (!strongErrorResponse.response) {\n throw errorResponse;\n }\n const topLevelError = strongErrorResponse.response.parsedBody?.error;\n if (!topLevelError) return errorResponse;\n let errorMessage = topLevelError.message;\n let code = topLevelError.code;\n function unwrap(error: ErrorModel | InnerErrorModel): ErrorModel {\n const innerError = error.innererror;\n if (innerError) {\n if (innerError.message) {\n errorMessage = appendReadableErrorMessage(errorMessage, innerError.message);\n }\n if (innerError.code) {\n code = innerError.code;\n }\n return unwrap(innerError);\n }\n return error as ErrorModel;\n }\n unwrap(topLevelError);\n return new RestError(errorMessage, {\n code,\n statusCode: strongErrorResponse.statusCode,\n });\n}\n\nexport async function throwError<T>(p: Promise<T>): Promise<T> {\n try {\n return await p;\n } catch (e: unknown) {\n throw transformError(e);\n }\n}\n\nfunction toHealthcareResult(\n docIds: string[],\n results: GeneratedHealthcareResult\n): HealthcareResult[] {\n function makeHealthcareEntity(entity: GeneratedHealthcareEntity): HealthcareEntity {\n const { dataSources, ...rest } = entity;\n return {\n dataSources: dataSources ?? [],\n ...rest,\n };\n }\n function makeHealthcareRelation(\n entities: HealthcareEntity[]\n ): (relation: HealthcareRelation) => HealthcareEntityRelation {\n return ({\n entities: generatedEntities,\n relationType,\n confidenceScore,\n }: HealthcareRelation): HealthcareEntityRelation => ({\n relationType: relationType,\n confidenceScore,\n roles: generatedEntities.map(\n (role: HealthcareRelationEntity): HealthcareEntityRelationRole => ({\n entity: entities[parseHealthcareEntityIndex(role.ref)],\n name: role.role,\n })\n ),\n });\n }\n return transformDocumentResults<\n HealthcareEntitiesDocumentResultWithDocumentDetectedLanguage,\n WithDetectedLanguage<HealthcareSuccessResult>\n >(docIds, results, {\n processSuccess: ({ entities, relations, detectedLanguage, ...rest }) => {\n const newEntities = entities.map(makeHealthcareEntity);\n return {\n entities: newEntities,\n entityRelations: relations.map(makeHealthcareRelation(newEntities)),\n // FIXME: remove this mitigation when the API fixes the representation on their end\n ...(detectedLanguage ? { detectedLanguage: { iso6391Name: detectedLanguage } as any } : {}),\n ...rest,\n };\n },\n });\n}\n\n/**\n * @internal\n */\nexport function transformAnalyzeBatchResults(\n docIds: string[],\n response: AnalyzeTextLROResultUnion[] = [],\n errors: ErrorModel[] = []\n): AnalyzeBatchResult[] {\n const errorMap = toIndexErrorMap(errors);\n return response.map((actionData, idx): AnalyzeBatchResult => {\n const { lastUpdateDateTime: completedOn, actionName, kind: resultKind } = actionData;\n const error = errorMap.get(idx);\n switch (resultKind as KnownAnalyzeTextLROResultsKind) {\n case \"SentimentAnalysisLROResults\": {\n const kind = \"SentimentAnalysis\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as SentimentLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toSentimentAnalysisResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"EntityRecognitionLROResults\": {\n const kind = \"EntityRecognition\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as EntityRecognitionLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind: \"EntityRecognition\",\n results: toEntityRecognitionResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"PiiEntityRecognitionLROResults\": {\n const kind = \"PiiEntityRecognition\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as PiiEntityRecognitionLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toPiiEntityRecognitionResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"KeyPhraseExtractionLROResults\": {\n const kind = \"KeyPhraseExtraction\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as KeyPhraseExtractionLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toKeyPhraseExtractionResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"EntityLinkingLROResults\": {\n const kind = \"EntityLinking\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as EntityLinkingLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toEntityLinkingResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"HealthcareLROResults\": {\n const kind = \"Healthcare\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as HealthcareLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toHealthcareResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"CustomEntityRecognitionLROResults\": {\n const kind = \"CustomEntityRecognition\";\n if (actionData.status === \"failed\") {\n return returnErrorCustomTask(kind, error, completedOn);\n }\n const { results } = actionData as CustomEntityRecognitionLROResult;\n const { deploymentName, projectName, statistics } = results;\n return {\n kind,\n results: transformDocumentResults<CustomEntitiesResultDocumentsItem>(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n deploymentName,\n projectName,\n };\n }\n case \"CustomSingleLabelClassificationLROResults\": {\n const kind = \"CustomSingleLabelClassification\";\n if (actionData.status === \"failed\") {\n return returnErrorCustomTask(kind, error, completedOn);\n }\n const { results } = actionData as CustomSingleLabelClassificationLROResult;\n const { deploymentName, projectName, statistics } = results;\n return {\n kind,\n results: transformDocumentResults<CustomLabelClassificationResultDocumentsItem>(\n docIds,\n results\n ),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n deploymentName,\n projectName,\n };\n }\n case \"CustomMultiLabelClassificationLROResults\": {\n const kind = \"CustomMultiLabelClassification\";\n if (actionData.status === \"failed\") {\n return returnErrorCustomTask(kind, error, completedOn);\n }\n const { results } = actionData as CustomMultiLabelClassificationLROResult;\n const { deploymentName, projectName, statistics } = results;\n return {\n kind,\n results: transformDocumentResults<CustomLabelClassificationResultDocumentsItem>(\n docIds,\n results\n ),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n deploymentName,\n projectName,\n };\n }\n case \"ExtractiveSummarizationLROResults\": {\n const kind = \"ExtractiveSummarization\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as ExtractiveSummarizationLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: transformDocumentResults<ExtractedSummaryDocumentResultWithDetectedLanguage>(\n docIds,\n results\n ),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"AbstractiveSummarizationLROResults\": {\n const kind = \"AbstractiveSummarization\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as AbstractiveSummarizationLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: transformDocumentResults<AbstractiveSummaryDocumentResultWithDetectedLanguage>(\n docIds,\n results\n ),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n default: {\n throw new Error(`Unsupported results kind: ${resultKind}`);\n }\n }\n });\n}\n/**\n * @internal\n * Transform a list of error into index and error Map\n */\nfunction toIndexErrorMap(errors: ErrorModel[]): Map<number, TextAnalysisError> {\n const errorMap = new Map<number, TextAnalysisError>();\n for (const error of errors) {\n const position = extractErrorPointerIndex(error);\n const { target, ...errorWithoutTarget } = error;\n errorMap.set(position, toTextAnalysisError(errorWithoutTarget));\n }\n return errorMap;\n}\n\n/**\n * Return the error for non-custom task\n *\n * @param kind - non custom task kind\n * @param error - error returned from the service\n * @param failedOn - the LastUpdateDateTime from the service\n * @returns - AnalyzeBatchResult with error\n */\nfunction returnErrorTask(\n kind: AnalyzeBatchActionName,\n error: TextAnalysisError | undefined,\n failedOn: Date\n): AnalyzeBatchResult {\n if (!error) {\n throw new Error(\"Unexpected response from service - no errors for missing action results.\");\n }\n return {\n kind,\n modelVersion: \"\",\n failedOn,\n error,\n } as AnalyzeBatchResult;\n}\n/**\n * Return the error for non-custom task\n *\n * @param kind - non custom task kind\n * @param error - error returned from the service\n * @param failedOn - the LastUpdateDateTime from the service\n * @returns AnalyzeBatchResult for custom task with error\n */\nfunction returnErrorCustomTask(\n kind: AnalyzeBatchActionName,\n error: TextAnalysisError | undefined,\n failedOn: Date\n): AnalyzeBatchResult {\n if (!error) {\n throw new Error(\"Unexpected response from service - no errors for missing action results.\");\n }\n return {\n kind,\n projectName: \"\",\n deploymentName: \"\",\n failedOn,\n error,\n } as AnalyzeBatchResult;\n}\n"]}
1
+ {"version":3,"file":"transforms.js","sourceRoot":"","sources":["../../src/transforms.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAmElC,OAAO,EAEL,wBAAwB,EACxB,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,GACtB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD;;;GAGG;AACH,SAAS,mBAAmB,CAAC,UAAwC;IACnE,4BAA4B;IAC5B,IAAI,UAAU,CAAC,UAAU,KAAK,SAAS,EAAE;QACvC,OAAO,mBAAmB,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;KACnD;IAED,yBACK,UAAU,EACb;AACJ,CAAC;AAED,SAAS,2BAA2B,CAAC,EAAU,EAAE,KAAiB;IAChE,OAAO;QACL,EAAE;QACF,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC;KAClC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAS,wBAAwB,CAK/B,GAAa,EACb,QAGC,EACD,OAGC;IAED,MAAM,EAAE,YAAY,GAAG,2BAA2B,EAAE,cAAc,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;IACrF,MAAM,cAAc,GAAG,cAAc;QACnC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAC;QACxC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;IACvB,MAAM,eAAe,GACnB,cACD,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAE9E,OAAO,qBAAqB,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;AACrD,CAAC;AAED,SAAS,yBAAyB,CAChC,MAAgB,EA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AAC,CAAC;KAC7F;IACD,OAAO;QACL,IAAI;QACJ,WAAW,EAAE,EAAE;QACf,cAAc,EAAE,EAAE;QAClB,QAAQ;QACR,KAAK;KACgB,CAAC;AAC1B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n AbstractiveSummarizationLROResult,\n AnalyzeResponse,\n AnalyzeTextLROResultUnion,\n AssessmentSentiment,\n CustomEntityRecognitionLROResult,\n CustomMultiLabelClassificationLROResult,\n CustomSingleLabelClassificationLROResult,\n DocumentError,\n EntitiesTaskResult,\n EntityLinkingLROResult,\n EntityLinkingTaskResult,\n EntityRecognitionLROResult,\n ErrorModel,\n ErrorResponse,\n ExtractiveSummarizationLROResult,\n EntityLinkingResult as GeneratedEntityLinkingResult,\n EntitiesResult as GeneratedEntityRecognitionResult,\n HealthcareEntity as GeneratedHealthcareEntity,\n HealthcareResult as GeneratedHealthcareResult,\n KeyPhraseResult as GeneratedKeyPhraseExtractionResult,\n LanguageDetectionResult as GeneratedLanguageDetectionResult,\n PiiResult as GeneratedPiiEntityRecognitionResult,\n SentenceSentiment as GeneratedSentenceSentiment,\n SentimentResponse as GeneratedSentimentAnalysisResult,\n HealthcareLROResult,\n HealthcareRelation,\n HealthcareRelationEntity,\n InnerErrorModel,\n KeyPhraseExtractionLROResult,\n KeyPhraseTaskResult,\n KnownAnalyzeTextLROResultsKind,\n LanguageDetectionTaskResult,\n PiiEntityRecognitionLROResult,\n PiiTaskResult,\n SentenceTarget,\n SentimentLROResult,\n SentimentTaskResult,\n TargetRelation,\n CustomEntitiesResultDocumentsItem,\n CustomLabelClassificationResultDocumentsItem,\n HealthcareEntitiesDocumentResult,\n} from \"./generated\";\nimport {\n AnalyzeActionName,\n AnalyzeBatchActionName,\n AnalyzeBatchResult,\n AnalyzeResult,\n EntityLinkingResult,\n EntityRecognitionResult,\n HealthcareEntity,\n HealthcareEntityRelation,\n HealthcareEntityRelationRole,\n HealthcareResult,\n HealthcareSuccessResult,\n KeyPhraseExtractionResult,\n LanguageDetectionResult,\n Opinion,\n PiiEntityRecognitionResult,\n SentenceSentiment,\n SentimentAnalysisResult,\n TextAnalysisError,\n TextAnalysisErrorResult,\n TextAnalysisSuccessResult,\n} from \"./models\";\nimport {\n AssessmentIndex,\n extractErrorPointerIndex,\n parseAssessmentIndex,\n parseHealthcareEntityIndex,\n sortResponseIdObjects,\n} from \"./util\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\n/**\n * Helper function for converting nested service error to the unified\n * TextAnalysisError\n */\nfunction toTextAnalysisError(errorModel: ErrorModel | InnerErrorModel): TextAnalysisError {\n // Return the deepest error.\n if (errorModel.innererror !== undefined) {\n return toTextAnalysisError(errorModel.innererror);\n }\n\n return {\n ...errorModel,\n };\n}\n\nfunction makeTextAnalysisErrorResult(id: string, error: ErrorModel): TextAnalysisErrorResult {\n return {\n id,\n error: toTextAnalysisError(error),\n };\n}\n\n/**\n * combines successful and erroneous results into a single array of results and\n * sort them so that the IDs order match that of the input documents array.\n * @param ids - the array of input document IDs.\n * @param response - the response received from the service.\n * @param options - an options bag that includes functions to process the results.\n */\nfunction transformDocumentResults<\n DocumentSuccess extends TextAnalysisSuccessResult,\n PublicDocumentSuccess extends TextAnalysisSuccessResult = DocumentSuccess,\n TError extends TextAnalysisErrorResult = TextAnalysisErrorResult\n>(\n ids: string[],\n response: {\n documents: DocumentSuccess[];\n errors: DocumentError[];\n },\n options?: {\n processSuccess?: (successResult: DocumentSuccess) => PublicDocumentSuccess;\n processError?: (id: string, error: ErrorModel) => TError;\n }\n): (PublicDocumentSuccess | TextAnalysisErrorResult)[] {\n const { processError = makeTextAnalysisErrorResult, processSuccess } = options || {};\n const successResults = processSuccess\n ? response.documents.map(processSuccess)\n : response.documents;\n const unsortedResults = (\n successResults as (PublicDocumentSuccess | TextAnalysisErrorResult)[]\n ).concat(response.errors.map((error) => processError(error.id, error.error)));\n\n return sortResponseIdObjects(ids, unsortedResults);\n}\n\nfunction toLanguageDetectionResult(\n docIds: string[],\n results: GeneratedLanguageDetectionResult\n): LanguageDetectionResult[] {\n return transformDocumentResults(docIds, results, {\n processSuccess: ({ detectedLanguage, ...rest }) => ({\n primaryLanguage: detectedLanguage,\n ...rest,\n }),\n });\n}\n\nfunction toPiiEntityRecognitionResult(\n docIds: string[],\n results: GeneratedPiiEntityRecognitionResult\n): PiiEntityRecognitionResult[] {\n return transformDocumentResults(docIds, results);\n}\n\nfunction toSentimentAnalysisResult(\n docIds: string[],\n results: GeneratedSentimentAnalysisResult\n): SentimentAnalysisResult[] {\n return transformDocumentResults(docIds, results, {\n processSuccess: ({ sentences, ...rest }) => ({\n ...rest,\n sentences: sentences.map((sentence) =>\n convertGeneratedSentenceSentiment(sentence, sentences)\n ),\n }),\n });\n}\n\n/**\n * Converts a sentence sentiment object returned by the service to another that\n * is user-friendly.\n *\n * @param sentence - The sentence sentiment object to be converted.\n * @param response - The entire response returned by the service.\n * @returns The user-friendly sentence sentiment object.\n * @internal\n */\nfunction convertGeneratedSentenceSentiment(\n { targets, assessments: _, ...rest }: GeneratedSentenceSentiment,\n sentences: GeneratedSentenceSentiment[]\n): SentenceSentiment {\n return {\n ...rest,\n opinions:\n targets?.map(\n // eslint-disable-next-line @typescript-eslint/no-shadow\n ({ relations, ...rest }: SentenceTarget): Opinion => ({\n target: rest,\n assessments: relations\n .filter((relation) => relation.relationType === \"assessment\")\n .map((relation) => convertTargetRelationToAssessmentSentiment(relation, sentences)),\n })\n ) ?? [],\n };\n}\n\n/**\n * Converts a target relation object returned by the service to an assessment\n * sentiment object where JSON pointers in the former are realized in the\n * latter.\n *\n * @param targetRelation - The target relation object to be converted.\n * @param response - The entire response returned by the service.\n * @returns The user-friendly assessment sentiment object.\n * @internal\n */\nfunction convertTargetRelationToAssessmentSentiment(\n targetRelation: TargetRelation,\n sentences: GeneratedSentenceSentiment[]\n): AssessmentSentiment {\n const assessmentPtr = targetRelation.ref;\n const assessmentIndex: AssessmentIndex = parseAssessmentIndex(assessmentPtr);\n const assessment =\n sentences?.[assessmentIndex.sentence].assessments?.[assessmentIndex.assessment];\n if (assessment !== undefined) {\n return assessment;\n } else {\n throw new Error(`Pointer \"${assessmentPtr}\" is not a valid Assessment pointer`);\n }\n}\n\nfunction toEntityLinkingResult(\n docIds: string[],\n results: GeneratedEntityLinkingResult\n): EntityLinkingResult[] {\n return transformDocumentResults(docIds, results);\n}\n\nfunction toKeyPhraseExtractionResult(\n docIds: string[],\n results: GeneratedKeyPhraseExtractionResult\n): KeyPhraseExtractionResult[] {\n return transformDocumentResults(docIds, results);\n}\n\nfunction toEntityRecognitionResult(\n docIds: string[],\n results: GeneratedEntityRecognitionResult\n): EntityRecognitionResult[] {\n return transformDocumentResults(docIds, results);\n}\n\n/**\n * @internal\n */\nexport function transformActionResult<ActionName extends AnalyzeActionName>(\n actionName: ActionName,\n docIds: string[],\n response: AnalyzeResponse\n): AnalyzeResult<AnalyzeActionName> {\n switch (response.kind) {\n case \"EntityLinkingResults\": {\n return toEntityLinkingResult(docIds, (response as EntityLinkingTaskResult).results);\n }\n case \"EntityRecognitionResults\": {\n return toEntityRecognitionResult(docIds, (response as EntitiesTaskResult).results);\n }\n case \"KeyPhraseExtractionResults\": {\n return toKeyPhraseExtractionResult(docIds, (response as KeyPhraseTaskResult).results);\n }\n case \"PiiEntityRecognitionResults\": {\n return toPiiEntityRecognitionResult(docIds, (response as PiiTaskResult).results);\n }\n case \"SentimentAnalysisResults\": {\n return toSentimentAnalysisResult(docIds, (response as SentimentTaskResult).results);\n }\n case \"LanguageDetectionResults\": {\n return toLanguageDetectionResult(docIds, (response as LanguageDetectionTaskResult).results);\n }\n default: {\n const __exhaust: never = response;\n throw new Error(`Unsupported results kind: ${__exhaust} for an action of type ${actionName}`);\n }\n }\n}\n\nfunction appendReadableErrorMessage(currentMessage: string, innerMessage: string): string {\n let message = currentMessage;\n if (message.slice(-1) !== \".\") {\n message = message + \".\";\n }\n return message + \" \" + innerMessage;\n}\n\n/**\n * @internal\n * parses incoming errors from the service/\n * @param error - the incoming error\n */\nfunction transformError(errorResponse: unknown): any {\n const strongErrorResponse = errorResponse as {\n response: {\n parsedBody?: ErrorResponse;\n };\n statusCode: number;\n };\n if (!strongErrorResponse.response) {\n throw errorResponse;\n }\n const topLevelError = strongErrorResponse.response.parsedBody?.error;\n if (!topLevelError) return errorResponse;\n let errorMessage = topLevelError.message;\n let code = topLevelError.code;\n function unwrap(error: ErrorModel | InnerErrorModel): ErrorModel {\n const innerError = error.innererror;\n if (innerError) {\n if (innerError.message) {\n errorMessage = appendReadableErrorMessage(errorMessage, innerError.message);\n }\n if (innerError.code) {\n code = innerError.code;\n }\n return unwrap(innerError);\n }\n return error as ErrorModel;\n }\n unwrap(topLevelError);\n return new RestError(errorMessage, {\n code,\n statusCode: strongErrorResponse.statusCode,\n });\n}\n\nexport async function throwError<T>(p: Promise<T>): Promise<T> {\n try {\n return await p;\n } catch (e: unknown) {\n throw transformError(e);\n }\n}\n\nfunction toHealthcareResult(\n docIds: string[],\n results: GeneratedHealthcareResult\n): HealthcareResult[] {\n function makeHealthcareEntity(entity: GeneratedHealthcareEntity): HealthcareEntity {\n const { dataSources, ...rest } = entity;\n return {\n dataSources: dataSources ?? [],\n ...rest,\n };\n }\n function makeHealthcareRelation(\n entities: HealthcareEntity[]\n ): (relation: HealthcareRelation) => HealthcareEntityRelation {\n return ({\n entities: generatedEntities,\n relationType,\n confidenceScore,\n }: HealthcareRelation): HealthcareEntityRelation => ({\n relationType: relationType,\n confidenceScore,\n roles: generatedEntities.map(\n (role: HealthcareRelationEntity): HealthcareEntityRelationRole => ({\n entity: entities[parseHealthcareEntityIndex(role.ref)],\n name: role.role,\n })\n ),\n });\n }\n return transformDocumentResults<HealthcareEntitiesDocumentResult, HealthcareSuccessResult>(\n docIds,\n results,\n {\n processSuccess: ({ entities, relations, ...rest }) => {\n const newEntities = entities.map(makeHealthcareEntity);\n return {\n entities: newEntities,\n entityRelations: relations.map(makeHealthcareRelation(newEntities)),\n ...rest,\n };\n },\n }\n );\n}\n\n/**\n * @internal\n */\nexport function transformAnalyzeBatchResults(\n docIds: string[],\n response: AnalyzeTextLROResultUnion[] = [],\n errors: ErrorModel[] = []\n): AnalyzeBatchResult[] {\n const errorMap = toIndexErrorMap(errors);\n return response.map((actionData, idx): AnalyzeBatchResult => {\n const { lastUpdateDateTime: completedOn, actionName, kind: resultKind } = actionData;\n const error = errorMap.get(idx);\n switch (resultKind as KnownAnalyzeTextLROResultsKind) {\n case \"SentimentAnalysisLROResults\": {\n const kind = \"SentimentAnalysis\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as SentimentLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toSentimentAnalysisResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"EntityRecognitionLROResults\": {\n const kind = \"EntityRecognition\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as EntityRecognitionLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind: \"EntityRecognition\",\n results: toEntityRecognitionResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"PiiEntityRecognitionLROResults\": {\n const kind = \"PiiEntityRecognition\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as PiiEntityRecognitionLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toPiiEntityRecognitionResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"KeyPhraseExtractionLROResults\": {\n const kind = \"KeyPhraseExtraction\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as KeyPhraseExtractionLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toKeyPhraseExtractionResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"EntityLinkingLROResults\": {\n const kind = \"EntityLinking\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as EntityLinkingLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toEntityLinkingResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"HealthcareLROResults\": {\n const kind = \"Healthcare\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as HealthcareLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind,\n results: toHealthcareResult(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"CustomEntityRecognitionLROResults\": {\n const kind = \"CustomEntityRecognition\";\n if (actionData.status === \"failed\") {\n return returnErrorCustomTask(kind, error, completedOn);\n }\n const { results } = actionData as CustomEntityRecognitionLROResult;\n const { deploymentName, projectName, statistics } = results;\n return {\n kind,\n results: transformDocumentResults<CustomEntitiesResultDocumentsItem>(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n deploymentName,\n projectName,\n };\n }\n case \"CustomSingleLabelClassificationLROResults\": {\n const kind = \"CustomSingleLabelClassification\";\n if (actionData.status === \"failed\") {\n return returnErrorCustomTask(kind, error, completedOn);\n }\n const { results } = actionData as CustomSingleLabelClassificationLROResult;\n const { deploymentName, projectName, statistics } = results;\n return {\n kind,\n results: transformDocumentResults<CustomLabelClassificationResultDocumentsItem>(\n docIds,\n results\n ),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n deploymentName,\n projectName,\n };\n }\n case \"CustomMultiLabelClassificationLROResults\": {\n const kind = \"CustomMultiLabelClassification\";\n if (actionData.status === \"failed\") {\n return returnErrorCustomTask(kind, error, completedOn);\n }\n const { results } = actionData as CustomMultiLabelClassificationLROResult;\n const { deploymentName, projectName, statistics } = results;\n return {\n kind,\n results: transformDocumentResults<CustomLabelClassificationResultDocumentsItem>(\n docIds,\n results\n ),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n deploymentName,\n projectName,\n };\n }\n case \"ExtractiveSummarizationLROResults\": {\n const kind = \"ExtractiveSummarization\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as ExtractiveSummarizationLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind: \"ExtractiveSummarization\",\n results: transformDocumentResults(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n case \"AbstractiveSummarizationLROResults\": {\n const kind = \"AbstractiveSummarization\";\n if (actionData.status === \"failed\") {\n return returnErrorTask(kind, error, completedOn);\n }\n const { results } = actionData as AbstractiveSummarizationLROResult;\n const { modelVersion, statistics } = results;\n return {\n kind: \"AbstractiveSummarization\",\n results: transformDocumentResults(docIds, results),\n completedOn,\n ...(actionName ? { actionName } : {}),\n ...(statistics ? { statistics } : {}),\n modelVersion,\n };\n }\n default: {\n throw new Error(`Unsupported results kind: ${resultKind}`);\n }\n }\n });\n}\n/**\n * @internal\n * Transform a list of error into index and error Map\n */\nfunction toIndexErrorMap(errors: ErrorModel[]): Map<number, TextAnalysisError> {\n const errorMap = new Map<number, TextAnalysisError>();\n for (const error of errors) {\n const position = extractErrorPointerIndex(error);\n const { target, ...errorWithoutTarget } = error;\n errorMap.set(position, toTextAnalysisError(errorWithoutTarget));\n }\n return errorMap;\n}\n\n/**\n * Return the error for non-custom task\n *\n * @param kind - non custom task kind\n * @param error - error returned from the service\n * @param failedOn - the LastUpdateDateTime from the service\n * @returns - AnalyzeBatchResult with error\n */\nfunction returnErrorTask(\n kind: AnalyzeBatchActionName,\n error: TextAnalysisError | undefined,\n failedOn: Date\n): AnalyzeBatchResult {\n if (!error) {\n throw new Error(\"Unexpected response from service - no errors for missing action results.\");\n }\n return {\n kind,\n modelVersion: \"\",\n failedOn,\n error,\n } as AnalyzeBatchResult;\n}\n/**\n * Return the error for non-custom task\n *\n * @param kind - non custom task kind\n * @param error - error returned from the service\n * @param failedOn - the LastUpdateDateTime from the service\n * @returns AnalyzeBatchResult for custom task with error\n */\nfunction returnErrorCustomTask(\n kind: AnalyzeBatchActionName,\n error: TextAnalysisError | undefined,\n failedOn: Date\n): AnalyzeBatchResult {\n if (!error) {\n throw new Error(\"Unexpected response from service - no errors for missing action results.\");\n }\n return {\n kind,\n projectName: \"\",\n deploymentName: \"\",\n failedOn,\n error,\n } as AnalyzeBatchResult;\n}\n"]}
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 text analysis features in the Azure Cognitive Language Service.",
6
- "version": "1.1.0-beta.2",
6
+ "version": "1.1.0",
7
7
  "keywords": [
8
8
  "node",
9
9
  "azure",
@@ -71,6 +71,7 @@
71
71
  "execute:samples": "dev-tool samples run samples-dev",
72
72
  "extract-api": "tsc -p . && api-extractor run --local",
73
73
  "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
74
+ "generate:client": "autorest --typescript swagger/README.md",
74
75
  "integration-test:browser": "dev-tool run test:browser",
75
76
  "integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 \"dist-esm/test/**/*.spec.js\"",
76
77
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
@@ -97,6 +98,9 @@
97
98
  "tslib": "^2.2.0"
98
99
  },
99
100
  "devDependencies": {
101
+ "@azure/storage-blob": "^12.20.0",
102
+ "@azure/ai-language-textauthoring": "1.0.0-beta.1",
103
+ "@types/decompress": "^4.0.0",
100
104
  "@azure/dev-tool": "^1.0.0",
101
105
  "@azure/eslint-plugin-azure-sdk": "^3.0.0",
102
106
  "@azure/identity": "^2.0.1",
@@ -109,6 +113,7 @@
109
113
  "@types/mocha": "^7.0.2",
110
114
  "@types/node": "^14.0.0",
111
115
  "@types/sinon": "^9.0.4",
116
+ "decompress": "^4.0.0",
112
117
  "chai": "^4.2.0",
113
118
  "chai-as-promised": "^7.1.1",
114
119
  "cross-env": "^7.0.2",
@@ -132,6 +137,6 @@
132
137
  "sinon": "^9.0.2",
133
138
  "source-map-support": "^0.5.9",
134
139
  "ts-node": "^10.0.0",
135
- "typescript": "~4.8.0"
140
+ "typescript": "~5.0.0"
136
141
  }
137
142
  }