@azure/ai-text-analytics 5.2.0-beta.2 → 6.0.0-alpha.20220518.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +375 -133
  3. package/dist/index.js +2797 -4176
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/src/azureKeyCredentialPolicy.js +2 -2
  6. package/dist-esm/src/azureKeyCredentialPolicy.js.map +1 -1
  7. package/dist-esm/src/constants.js +16 -0
  8. package/dist-esm/src/constants.js.map +1 -0
  9. package/dist-esm/src/generated/generatedClient.js +80 -334
  10. package/dist-esm/src/generated/generatedClient.js.map +1 -1
  11. package/dist-esm/src/generated/index.js +1 -1
  12. package/dist-esm/src/generated/index.js.map +1 -1
  13. package/dist-esm/src/generated/models/index.js +106 -35
  14. package/dist-esm/src/generated/models/index.js.map +1 -1
  15. package/dist-esm/src/generated/models/mappers.js +1625 -2101
  16. package/dist-esm/src/generated/models/mappers.js.map +1 -1
  17. package/dist-esm/src/generated/models/parameters.js +18 -105
  18. package/dist-esm/src/generated/models/parameters.js.map +1 -1
  19. package/dist-esm/src/generated/operations/analyzeText.js +105 -0
  20. package/dist-esm/src/generated/operations/analyzeText.js.map +1 -0
  21. package/dist-esm/src/generated/operations/index.js +9 -0
  22. package/dist-esm/src/generated/operations/index.js.map +1 -0
  23. package/dist-esm/src/generated/operationsInterfaces/analyzeText.js +9 -0
  24. package/dist-esm/src/generated/operationsInterfaces/analyzeText.js.map +1 -0
  25. package/dist-esm/src/generated/operationsInterfaces/index.js +9 -0
  26. package/dist-esm/src/generated/operationsInterfaces/index.js.map +1 -0
  27. package/dist-esm/src/index.js +14 -5
  28. package/dist-esm/src/index.js.map +1 -1
  29. package/dist-esm/src/lro.js +195 -0
  30. package/dist-esm/src/lro.js.map +1 -0
  31. package/dist-esm/src/models.js +42 -0
  32. package/dist-esm/src/models.js.map +1 -0
  33. package/dist-esm/src/textAnalysisClient.js +197 -0
  34. package/dist-esm/src/textAnalysisClient.js.map +1 -0
  35. package/dist-esm/src/transforms.js +279 -0
  36. package/dist-esm/src/transforms.js.map +1 -0
  37. package/dist-esm/src/util.js +35 -141
  38. package/dist-esm/src/util.js.map +1 -1
  39. package/package.json +25 -33
  40. package/types/ai-text-analytics.d.ts +1402 -1421
  41. package/CHANGELOG.md +0 -162
  42. package/dist-esm/src/analyzeActionsResult.js +0 -205
  43. package/dist-esm/src/analyzeActionsResult.js.map +0 -1
  44. package/dist-esm/src/analyzeHealthcareEntitiesResult.js +0 -53
  45. package/dist-esm/src/analyzeHealthcareEntitiesResult.js.map +0 -1
  46. package/dist-esm/src/analyzeLro.js +0 -132
  47. package/dist-esm/src/analyzeLro.js.map +0 -1
  48. package/dist-esm/src/analyzeSentimentResult.js +0 -74
  49. package/dist-esm/src/analyzeSentimentResult.js.map +0 -1
  50. package/dist-esm/src/analyzeSentimentResultArray.js +0 -11
  51. package/dist-esm/src/analyzeSentimentResultArray.js.map +0 -1
  52. package/dist-esm/src/detectLanguageResult.js +0 -17
  53. package/dist-esm/src/detectLanguageResult.js.map +0 -1
  54. package/dist-esm/src/detectLanguageResultArray.js +0 -11
  55. package/dist-esm/src/detectLanguageResultArray.js.map +0 -1
  56. package/dist-esm/src/extractKeyPhrasesResult.js +0 -17
  57. package/dist-esm/src/extractKeyPhrasesResult.js.map +0 -1
  58. package/dist-esm/src/extractKeyPhrasesResultArray.js +0 -11
  59. package/dist-esm/src/extractKeyPhrasesResultArray.js.map +0 -1
  60. package/dist-esm/src/extractSummaryResult.js +0 -17
  61. package/dist-esm/src/extractSummaryResult.js.map +0 -1
  62. package/dist-esm/src/extractSummaryResultArray.js +0 -11
  63. package/dist-esm/src/extractSummaryResultArray.js.map +0 -1
  64. package/dist-esm/src/generated/generatedClientContext.js +0 -42
  65. package/dist-esm/src/generated/generatedClientContext.js.map +0 -1
  66. package/dist-esm/src/healthLro.js +0 -139
  67. package/dist-esm/src/healthLro.js.map +0 -1
  68. package/dist-esm/src/multiCategoryClassifyResult.js +0 -17
  69. package/dist-esm/src/multiCategoryClassifyResult.js.map +0 -1
  70. package/dist-esm/src/multiCategoryClassifyResultArray.js +0 -11
  71. package/dist-esm/src/multiCategoryClassifyResultArray.js.map +0 -1
  72. package/dist-esm/src/pollerModels.js +0 -4
  73. package/dist-esm/src/pollerModels.js.map +0 -1
  74. package/dist-esm/src/recognizeCategorizedEntitiesResult.js +0 -17
  75. package/dist-esm/src/recognizeCategorizedEntitiesResult.js.map +0 -1
  76. package/dist-esm/src/recognizeCategorizedEntitiesResultArray.js +0 -11
  77. package/dist-esm/src/recognizeCategorizedEntitiesResultArray.js.map +0 -1
  78. package/dist-esm/src/recognizeCustomEntitiesResult.js +0 -17
  79. package/dist-esm/src/recognizeCustomEntitiesResult.js.map +0 -1
  80. package/dist-esm/src/recognizeCustomEntitiesResultArray.js +0 -11
  81. package/dist-esm/src/recognizeCustomEntitiesResultArray.js.map +0 -1
  82. package/dist-esm/src/recognizeLinkedEntitiesResult.js +0 -17
  83. package/dist-esm/src/recognizeLinkedEntitiesResult.js.map +0 -1
  84. package/dist-esm/src/recognizeLinkedEntitiesResultArray.js +0 -11
  85. package/dist-esm/src/recognizeLinkedEntitiesResultArray.js.map +0 -1
  86. package/dist-esm/src/recognizePiiEntitiesResult.js +0 -18
  87. package/dist-esm/src/recognizePiiEntitiesResult.js.map +0 -1
  88. package/dist-esm/src/recognizePiiEntitiesResultArray.js +0 -11
  89. package/dist-esm/src/recognizePiiEntitiesResultArray.js.map +0 -1
  90. package/dist-esm/src/singleCategoryClassifyResult.js +0 -17
  91. package/dist-esm/src/singleCategoryClassifyResult.js.map +0 -1
  92. package/dist-esm/src/singleCategoryClassifyResultArray.js +0 -11
  93. package/dist-esm/src/singleCategoryClassifyResultArray.js.map +0 -1
  94. package/dist-esm/src/textAnalyticsAction.js +0 -4
  95. package/dist-esm/src/textAnalyticsAction.js.map +0 -1
  96. package/dist-esm/src/textAnalyticsClient.js +0 -511
  97. package/dist-esm/src/textAnalyticsClient.js.map +0 -1
  98. package/dist-esm/src/textAnalyticsOperationOptions.js +0 -4
  99. package/dist-esm/src/textAnalyticsOperationOptions.js.map +0 -1
  100. package/dist-esm/src/textAnalyticsResult.js +0 -94
  101. package/dist-esm/src/textAnalyticsResult.js.map +0 -1
  102. package/dist-esm/src/tracing.js +0 -12
  103. package/dist-esm/src/tracing.js.map +0 -1
@@ -1,17 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { makeTextAnalyticsSuccessResult, makeTextAnalyticsErrorResult } from "./textAnalyticsResult";
4
- /**
5
- * @internal
6
- */
7
- export function makeRecognizeCustomEntitiesResult(result) {
8
- const { id, warnings, statistics, entities } = result;
9
- return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { entities });
10
- }
11
- /**
12
- * @internal
13
- */
14
- export function makeRecognizeCustomEntitiesErrorResult(id, error) {
15
- return makeTextAnalyticsErrorResult(id, error);
16
- }
17
- //# sourceMappingURL=recognizeCustomEntitiesResult.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recognizeCustomEntitiesResult.js","sourceRoot":"","sources":["../../src/recognizeCustomEntitiesResult.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,8BAA8B,EAG9B,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AA2B/B;;GAEG;AACH,MAAM,UAAU,iCAAiC,CAC/C,MAAwB;IAExB,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IACtD,uCACK,8BAA8B,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,KAC3D,QAAQ,IACR;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sCAAsC,CACpD,EAAU,EACV,KAAyB;IAEzB,OAAO,4BAA4B,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n makeTextAnalyticsSuccessResult,\n TextAnalyticsSuccessResult,\n TextAnalyticsErrorResult,\n makeTextAnalyticsErrorResult\n} from \"./textAnalyticsResult\";\nimport { TextAnalyticsError, DocumentEntities } from \"./generated/models\";\nimport { CategorizedEntity } from \"./recognizeCategorizedEntitiesResult\";\n\n/**\n * The result of the custom recognize entities operation on a single document.\n */\nexport type RecognizeCustomEntitiesResult =\n | RecognizeCustomEntitiesSuccessResult\n | RecognizeCustomEntitiesErrorResult;\n\n/**\n * The result of the recognize custom entities operation on a single document,\n * containing a collection of the entities identified in that document.\n */\nexport interface RecognizeCustomEntitiesSuccessResult extends TextAnalyticsSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n entities: CategorizedEntity[];\n}\n\n/**\n * An error result from the recognize custom entities operation on a single document.\n */\nexport type RecognizeCustomEntitiesErrorResult = TextAnalyticsErrorResult;\n\n/**\n * @internal\n */\nexport function makeRecognizeCustomEntitiesResult(\n result: DocumentEntities\n): RecognizeCustomEntitiesSuccessResult {\n const { id, warnings, statistics, entities } = result;\n return {\n ...makeTextAnalyticsSuccessResult(id, warnings, statistics),\n entities\n };\n}\n\n/**\n * @internal\n */\nexport function makeRecognizeCustomEntitiesErrorResult(\n id: string,\n error: TextAnalyticsError\n): RecognizeCustomEntitiesErrorResult {\n return makeTextAnalyticsErrorResult(id, error);\n}\n"]}
@@ -1,11 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { makeRecognizeCustomEntitiesResult, makeRecognizeCustomEntitiesErrorResult } from "./recognizeCustomEntitiesResult";
4
- import { combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo } from "./textAnalyticsResult";
5
- /**
6
- * @internal
7
- */
8
- export function makeRecognizeCustomEntitiesResultArray(input, response) {
9
- return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, makeRecognizeCustomEntitiesResult, makeRecognizeCustomEntitiesErrorResult);
10
- }
11
- //# sourceMappingURL=recognizeCustomEntitiesResultArray.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recognizeCustomEntitiesResultArray.js","sourceRoot":"","sources":["../../src/recognizeCustomEntitiesResultArray.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAEL,iCAAiC,EACjC,sCAAsC,EACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,wEAAwE,EAAE,MAAM,uBAAuB,CAAC;AAyBjH;;GAEG;AACH,MAAM,UAAU,sCAAsC,CACpD,KAA0B,EAC1B,QAA8B;IAE9B,OAAO,wEAAwE,CAC7E,KAAK,EACL,QAAQ,EACR,iCAAiC,EACjC,sCAAsC,CACvC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n TextDocumentBatchStatistics,\n TextDocumentInput,\n CustomEntitiesResult\n} from \"./generated/models\";\nimport {\n RecognizeCustomEntitiesResult,\n makeRecognizeCustomEntitiesResult,\n makeRecognizeCustomEntitiesErrorResult\n} from \"./recognizeCustomEntitiesResult\";\nimport { combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo } from \"./textAnalyticsResult\";\n\n/**\n * Array of `CustomRecognizeEntitiesResult` objects corresponding to a batch of input documents, and\n * annotated with information about the batch operation.\n */\nexport interface RecognizeCustomEntitiesResultArray extends Array<RecognizeCustomEntitiesResult> {\n /**\n * Statistics about the input document batch and how it was processed\n * by the service. This property will have a value when includeStatistics is set to true\n * in the client call.\n */\n statistics?: TextDocumentBatchStatistics;\n /**\n * The version of the text analytics custom project used by this operation on this\n * batch of input documents.\n */\n projectName: string;\n /**\n * The version of the text analytics custom deployment used by this operation on this\n * batch of input documents.\n */\n deploymentName: string;\n}\n\n/**\n * @internal\n */\nexport function makeRecognizeCustomEntitiesResultArray(\n input: TextDocumentInput[],\n response: CustomEntitiesResult\n): RecognizeCustomEntitiesResultArray {\n return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(\n input,\n response,\n makeRecognizeCustomEntitiesResult,\n makeRecognizeCustomEntitiesErrorResult\n );\n}\n"]}
@@ -1,17 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { makeTextAnalyticsSuccessResult, makeTextAnalyticsErrorResult } from "./textAnalyticsResult";
4
- /**
5
- * @internal
6
- */
7
- export function makeRecognizeLinkedEntitiesResult(result) {
8
- const { statistics, id, warnings, entities } = result;
9
- return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { entities });
10
- }
11
- /**
12
- * @internal
13
- */
14
- export function makeRecognizeLinkedEntitiesErrorResult(id, error) {
15
- return makeTextAnalyticsErrorResult(id, error);
16
- }
17
- //# sourceMappingURL=recognizeLinkedEntitiesResult.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recognizeLinkedEntitiesResult.js","sourceRoot":"","sources":["../../src/recognizeLinkedEntitiesResult.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,8BAA8B,EAG9B,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AA0B/B;;GAEG;AACH,MAAM,UAAU,iCAAiC,CAC/C,MAA8B;IAE9B,MAAM,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,MAAM,CAAC;IACtD,uCACK,8BAA8B,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,KAC3D,QAAQ,IACR;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sCAAsC,CACpD,EAAU,EACV,KAAyB;IAEzB,OAAO,4BAA4B,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n makeTextAnalyticsSuccessResult,\n TextAnalyticsSuccessResult,\n TextAnalyticsErrorResult,\n makeTextAnalyticsErrorResult\n} from \"./textAnalyticsResult\";\nimport { TextAnalyticsError, LinkedEntity, DocumentLinkedEntities } from \"./generated/models\";\n\n/**\n * The result of the recognize linked entities operation on a single document.\n */\nexport type RecognizeLinkedEntitiesResult =\n | RecognizeLinkedEntitiesSuccessResult\n | RecognizeLinkedEntitiesErrorResult;\n\n/**\n * The result of the recognize linked entities operation on a single document,\n * containing a collection of the `LinkedEntity` objects identified in that document.\n */\nexport interface RecognizeLinkedEntitiesSuccessResult extends TextAnalyticsSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: LinkedEntity[];\n}\n\n/**\n * An error result from the recognize linked entities operation on a single document.\n */\nexport type RecognizeLinkedEntitiesErrorResult = TextAnalyticsErrorResult;\n\n/**\n * @internal\n */\nexport function makeRecognizeLinkedEntitiesResult(\n result: DocumentLinkedEntities\n): RecognizeLinkedEntitiesSuccessResult {\n const { statistics, id, warnings, entities } = result;\n return {\n ...makeTextAnalyticsSuccessResult(id, warnings, statistics),\n entities\n };\n}\n\n/**\n * @internal\n */\nexport function makeRecognizeLinkedEntitiesErrorResult(\n id: string,\n error: TextAnalyticsError\n): RecognizeLinkedEntitiesErrorResult {\n return makeTextAnalyticsErrorResult(id, error);\n}\n"]}
@@ -1,11 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { makeRecognizeLinkedEntitiesResult, makeRecognizeLinkedEntitiesErrorResult } from "./recognizeLinkedEntitiesResult";
4
- import { combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion } from "./textAnalyticsResult";
5
- /**
6
- * @internal
7
- */
8
- export function makeRecognizeLinkedEntitiesResultArray(input, response) {
9
- return combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion(input, response, makeRecognizeLinkedEntitiesResult, makeRecognizeLinkedEntitiesErrorResult);
10
- }
11
- //# sourceMappingURL=recognizeLinkedEntitiesResultArray.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recognizeLinkedEntitiesResultArray.js","sourceRoot":"","sources":["../../src/recognizeLinkedEntitiesResultArray.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAEL,iCAAiC,EACjC,sCAAsC,EACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,mEAAmE,EAAE,MAAM,uBAAuB,CAAC;AAoB5G;;GAEG;AACH,MAAM,UAAU,sCAAsC,CACpD,KAA0B,EAC1B,QAA6B;IAE7B,OAAO,mEAAmE,CACxE,KAAK,EACL,QAAQ,EACR,iCAAiC,EACjC,sCAAsC,CACvC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n TextDocumentBatchStatistics,\n TextDocumentInput,\n EntityLinkingResult\n} from \"./generated/models\";\nimport {\n RecognizeLinkedEntitiesResult,\n makeRecognizeLinkedEntitiesResult,\n makeRecognizeLinkedEntitiesErrorResult\n} from \"./recognizeLinkedEntitiesResult\";\nimport { combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion } from \"./textAnalyticsResult\";\n\n/**\n * Array of `RecognizeLinkedEntitiesResult` objects corresponding to a batch of input documents, and\n * annotated with information about the batch operation.\n */\nexport interface RecognizeLinkedEntitiesResultArray extends Array<RecognizeLinkedEntitiesResult> {\n /**\n * Statistics about the input document batch and how it was processed\n * by the service. This property will have a value when includeStatistics is set to true\n * in the client call.\n */\n statistics?: TextDocumentBatchStatistics;\n /**\n * The version of the text analytics model used by this operation on this\n * batch of input documents.\n */\n modelVersion: string;\n}\n\n/**\n * @internal\n */\nexport function makeRecognizeLinkedEntitiesResultArray(\n input: TextDocumentInput[],\n response: EntityLinkingResult\n): RecognizeLinkedEntitiesResultArray {\n return combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion(\n input,\n response,\n makeRecognizeLinkedEntitiesResult,\n makeRecognizeLinkedEntitiesErrorResult\n );\n}\n"]}
@@ -1,18 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { makeTextAnalyticsSuccessResult, makeTextAnalyticsErrorResult } from "./textAnalyticsResult";
4
- /**
5
- * @internal
6
- */
7
- export function makeRecognizePiiEntitiesResult(document) {
8
- const { id, entities, warnings, statistics, redactedText } = document;
9
- return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { entities,
10
- redactedText });
11
- }
12
- /**
13
- * @internal
14
- */
15
- export function makeRecognizePiiEntitiesErrorResult(id, error) {
16
- return makeTextAnalyticsErrorResult(id, error);
17
- }
18
- //# sourceMappingURL=recognizePiiEntitiesResult.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recognizePiiEntitiesResult.js","sourceRoot":"","sources":["../../src/recognizePiiEntitiesResult.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,8BAA8B,EAG9B,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AAoC/B;;GAEG;AACH,MAAM,UAAU,8BAA8B,CAC5C,QAA6B;IAE7B,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;IACtE,uCACK,8BAA8B,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,KAC3D,QAAQ;QACR,YAAY,IACZ;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mCAAmC,CACjD,EAAU,EACV,KAAyB;IAEzB,OAAO,4BAA4B,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n makeTextAnalyticsSuccessResult,\n TextAnalyticsSuccessResult,\n TextAnalyticsErrorResult,\n makeTextAnalyticsErrorResult\n} from \"./textAnalyticsResult\";\nimport { Entity, PiiDocumentEntities, TextAnalyticsError } from \"./generated/models\";\n\n/**\n * An entity from PII recognition with information about the kind of PII\n * encountered.\n */\nexport interface PiiEntity extends Entity {}\n\n/**\n * The result of the recognize entities operation on a single document.\n */\nexport type RecognizePiiEntitiesResult =\n | RecognizePiiEntitiesSuccessResult\n | RecognizePiiEntitiesErrorResult;\n\n/**\n * The result of the recognize entities operation on a single document, containing the collection of\n * `Entity` objects identified in that document.\n */\nexport interface RecognizePiiEntitiesSuccessResult extends TextAnalyticsSuccessResult {\n /**\n * The collection of entities identified in the input document.\n */\n readonly entities: PiiEntity[];\n /**\n * The text redacted.\n */\n redactedText: string;\n}\n\n/**\n * An error result from the recognize entities operation on a single document.\n */\nexport type RecognizePiiEntitiesErrorResult = TextAnalyticsErrorResult;\n\n/**\n * @internal\n */\nexport function makeRecognizePiiEntitiesResult(\n document: PiiDocumentEntities\n): RecognizePiiEntitiesSuccessResult {\n const { id, entities, warnings, statistics, redactedText } = document;\n return {\n ...makeTextAnalyticsSuccessResult(id, warnings, statistics),\n entities,\n redactedText\n };\n}\n\n/**\n * @internal\n */\nexport function makeRecognizePiiEntitiesErrorResult(\n id: string,\n error: TextAnalyticsError\n): RecognizePiiEntitiesErrorResult {\n return makeTextAnalyticsErrorResult(id, error);\n}\n"]}
@@ -1,11 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { makeRecognizePiiEntitiesResult, makeRecognizePiiEntitiesErrorResult } from "./recognizePiiEntitiesResult";
4
- import { combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion } from "./textAnalyticsResult";
5
- /**
6
- * @internal
7
- */
8
- export function makeRecognizePiiEntitiesResultArray(input, response) {
9
- return combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion(input, response, makeRecognizePiiEntitiesResult, makeRecognizePiiEntitiesErrorResult);
10
- }
11
- //# sourceMappingURL=recognizePiiEntitiesResultArray.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recognizePiiEntitiesResultArray.js","sourceRoot":"","sources":["../../src/recognizePiiEntitiesResultArray.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,8BAA8B,EAC9B,mCAAmC,EACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,mEAAmE,EAAE,MAAM,uBAAuB,CAAC;AAoB5G;;GAEG;AACH,MAAM,UAAU,mCAAmC,CACjD,KAA0B,EAC1B,QAAmB;IAEnB,OAAO,mEAAmE,CACxE,KAAK,EACL,QAAQ,EACR,8BAA8B,EAC9B,mCAAmC,CACpC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TextDocumentBatchStatistics, TextDocumentInput, PiiResult } from \"./generated/models\";\nimport {\n RecognizePiiEntitiesResult,\n makeRecognizePiiEntitiesResult,\n makeRecognizePiiEntitiesErrorResult\n} from \"./recognizePiiEntitiesResult\";\nimport { combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion } from \"./textAnalyticsResult\";\n\n/**\n * Collection of `RecognizePiiEntitiesResult` objects corresponding to a batch of input documents, and\n * annotated with information about the batch operation.\n */\nexport interface RecognizePiiEntitiesResultArray extends Array<RecognizePiiEntitiesResult> {\n /**\n * Statistics about the input document batch and how it was processed\n * by the service. This property will have a value when includeStatistics is set to true\n * in the client call.\n */\n statistics?: TextDocumentBatchStatistics;\n /**\n * The version of the text analytics model used by this operation on this\n * batch of input documents.\n */\n modelVersion: string;\n}\n\n/**\n * @internal\n */\nexport function makeRecognizePiiEntitiesResultArray(\n input: TextDocumentInput[],\n response: PiiResult\n): RecognizePiiEntitiesResultArray {\n return combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion(\n input,\n response,\n makeRecognizePiiEntitiesResult,\n makeRecognizePiiEntitiesErrorResult\n );\n}\n"]}
@@ -1,17 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { makeTextAnalyticsSuccessResult, makeTextAnalyticsErrorResult } from "./textAnalyticsResult";
4
- /**
5
- * @internal
6
- */
7
- export function makeSingleCategoryClassifyResult(result) {
8
- const { id, warnings, statistics, classification } = result;
9
- return Object.assign(Object.assign({}, makeTextAnalyticsSuccessResult(id, warnings, statistics)), { classification });
10
- }
11
- /**
12
- * @internal
13
- */
14
- export function makeSingleCategoryClassifyErrorResult(id, error) {
15
- return makeTextAnalyticsErrorResult(id, error);
16
- }
17
- //# sourceMappingURL=singleCategoryClassifyResult.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"singleCategoryClassifyResult.js","sourceRoot":"","sources":["../../src/singleCategoryClassifyResult.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,8BAA8B,EAG9B,4BAA4B,EAC7B,MAAM,uBAAuB,CAAC;AAmC/B;;GAEG;AACH,MAAM,UAAU,gCAAgC,CAC9C,MAAoC;IAEpC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;IAC5D,uCACK,8BAA8B,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,CAAC,KAC3D,cAAc,IACd;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,EAAU,EACV,KAAyB;IAEzB,OAAO,4BAA4B,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AACjD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n makeTextAnalyticsSuccessResult,\n TextAnalyticsSuccessResult,\n TextAnalyticsErrorResult,\n makeTextAnalyticsErrorResult\n} from \"./textAnalyticsResult\";\nimport {\n TextAnalyticsError,\n ClassificationResult,\n SingleClassificationDocument\n} from \"./generated/models\";\n\n/**\n * The result of the custom classify document single category operation on a single document.\n */\nexport type SingleCategoryClassifyResult =\n | SingleCategoryClassifySuccessResult\n | SingleCategoryClassifyErrorResult;\n\n/**\n * The result of the custom classify document single category operation on a single document,\n * containing the result of the classification.\n */\nexport interface SingleCategoryClassifySuccessResult extends TextAnalyticsSuccessResult {\n /**\n * The classification result of the input document.\n */\n classification: ClassificationCategory;\n}\n\n/**\n * A classification result from a custom classify document single category action\n */\nexport interface ClassificationCategory extends ClassificationResult {}\n\n/**\n * An error result from the custom classify document single category operation on a single document.\n */\nexport type SingleCategoryClassifyErrorResult = TextAnalyticsErrorResult;\n\n/**\n * @internal\n */\nexport function makeSingleCategoryClassifyResult(\n result: SingleClassificationDocument\n): SingleCategoryClassifySuccessResult {\n const { id, warnings, statistics, classification } = result;\n return {\n ...makeTextAnalyticsSuccessResult(id, warnings, statistics),\n classification\n };\n}\n\n/**\n * @internal\n */\nexport function makeSingleCategoryClassifyErrorResult(\n id: string,\n error: TextAnalyticsError\n): SingleCategoryClassifyErrorResult {\n return makeTextAnalyticsErrorResult(id, error);\n}\n"]}
@@ -1,11 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- import { makeSingleCategoryClassifyResult, makeSingleCategoryClassifyErrorResult } from "./singleCategoryClassifyResult";
4
- import { combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo } from "./textAnalyticsResult";
5
- /**
6
- * @internal
7
- */
8
- export function makeSingleCategoryClassifyResultArray(input, response) {
9
- return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(input, response, makeSingleCategoryClassifyResult, makeSingleCategoryClassifyErrorResult);
10
- }
11
- //# sourceMappingURL=singleCategoryClassifyResultArray.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"singleCategoryClassifyResultArray.js","sourceRoot":"","sources":["../../src/singleCategoryClassifyResultArray.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAEL,gCAAgC,EAChC,qCAAqC,EACtC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,wEAAwE,EAAE,MAAM,uBAAuB,CAAC;AAyBjH;;GAEG;AACH,MAAM,UAAU,qCAAqC,CACnD,KAA0B,EAC1B,QAA0C;IAE1C,OAAO,wEAAwE,CAC7E,KAAK,EACL,QAAQ,EACR,gCAAgC,EAChC,qCAAqC,CACtC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n TextDocumentBatchStatistics,\n TextDocumentInput,\n CustomSingleClassificationResult\n} from \"./generated/models\";\nimport {\n SingleCategoryClassifyResult,\n makeSingleCategoryClassifyResult,\n makeSingleCategoryClassifyErrorResult\n} from \"./singleCategoryClassifyResult\";\nimport { combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo } from \"./textAnalyticsResult\";\n\n/**\n * Array of `SingleCategoryClassifyResult` objects corresponding to a batch of input documents, and\n * annotated with information about the batch operation.\n */\nexport interface SingleCategoryClassifyResultArray extends Array<SingleCategoryClassifyResult> {\n /**\n * Statistics about the input document batch and how it was processed\n * by the service. This property will have a value when includeStatistics is set to true\n * in the client call.\n */\n statistics?: TextDocumentBatchStatistics;\n /**\n * The version of the text analytics custom project used by this operation on this\n * batch of input documents.\n */\n projectName: string;\n /**\n * The version of the text analytics custom deployment used by this operation on this\n * batch of input documents.\n */\n deploymentName: string;\n}\n\n/**\n * @internal\n */\nexport function makeSingleCategoryClassifyResultArray(\n input: TextDocumentInput[],\n response: CustomSingleClassificationResult\n): SingleCategoryClassifyResultArray {\n return combineSuccessfulAndErroneousDocumentsWithStatisticsAndCustomProjectInfo(\n input,\n response,\n makeSingleCategoryClassifyResult,\n makeSingleCategoryClassifyErrorResult\n );\n}\n"]}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export {};
4
- //# sourceMappingURL=textAnalyticsAction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"textAnalyticsAction.js","sourceRoot":"","sources":["../../src/textAnalyticsAction.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * The type of a standard text analytics action.\n */\nexport interface TextAnalyticsAction {\n /**\n * The version of the text analytics model used by this operation on this\n * batch of input documents.\n */\n modelVersion?: string;\n /**\n * The preferred name for this action.\n */\n actionName?: string;\n}\n\n/**\n * The type of a custom text analytics action.\n */\nexport interface CustomTextAnalyticsAction {\n /**\n * The project name for the text analytics model used by this operation on this\n * batch of input documents.\n */\n projectName: string;\n /**\n * The deployment name for the text analytics model used by this operation on this\n * batch of input documents.\n */\n deploymentName: string;\n /**\n * The preferred name for this action.\n */\n actionName?: string;\n}\n"]}