@azure/ai-text-analytics 5.1.1-alpha.20230926.1 → 5.1.1-alpha.20230929.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var coreAuth = require('@azure/core-auth');
6
4
  var tslib = require('tslib');
7
5
  var coreRestPipeline = require('@azure/core-rest-pipeline');
@@ -11,8 +9,7 @@ var url = require('url');
11
9
  var coreTracing = require('@azure/core-tracing');
12
10
  var coreLro = require('@azure/core-lro');
13
11
 
14
- function _interopNamespace(e) {
15
- if (e && e.__esModule) return e;
12
+ function _interopNamespaceDefault(e) {
16
13
  var n = Object.create(null);
17
14
  if (e) {
18
15
  Object.keys(e).forEach(function (k) {
@@ -25,12 +22,12 @@ function _interopNamespace(e) {
25
22
  }
26
23
  });
27
24
  }
28
- n["default"] = e;
25
+ n.default = e;
29
26
  return Object.freeze(n);
30
27
  }
31
28
 
32
- var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
33
- var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespaceDefault(coreRestPipeline);
30
+ var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
34
31
 
35
32
  // Copyright (c) Microsoft Corporation.
36
33
  // Licensed under the MIT license.
@@ -2478,87 +2475,87 @@ const GeneratedClientHealthHeaders = {
2478
2475
 
2479
2476
  var Mappers = /*#__PURE__*/Object.freeze({
2480
2477
  __proto__: null,
2481
- JobDescriptor: JobDescriptor,
2482
2478
  AnalysisInput: AnalysisInput,
2483
- MultiLanguageBatchInput: MultiLanguageBatchInput,
2484
- TextDocumentInput: TextDocumentInput,
2485
- JobManifest: JobManifest,
2486
- JobManifestTasks: JobManifestTasks,
2479
+ AnalyzeBatchInput: AnalyzeBatchInput,
2480
+ AnalyzeJobDisplayName: AnalyzeJobDisplayName,
2481
+ AnalyzeJobErrorsAndStatistics: AnalyzeJobErrorsAndStatistics,
2482
+ AnalyzeJobMetadata: AnalyzeJobMetadata,
2483
+ AnalyzeJobState: AnalyzeJobState,
2484
+ DetectLanguageInput: DetectLanguageInput,
2485
+ DetectedLanguage: DetectedLanguage,
2486
+ DocumentEntities: DocumentEntities,
2487
+ DocumentError: DocumentError,
2488
+ DocumentHealthcareEntities: DocumentHealthcareEntities,
2489
+ DocumentKeyPhrases: DocumentKeyPhrases,
2490
+ DocumentLanguage: DocumentLanguage,
2491
+ DocumentLinkedEntities: DocumentLinkedEntities,
2492
+ DocumentSentiment: DocumentSentiment,
2493
+ EntitiesResult: EntitiesResult,
2487
2494
  EntitiesTask: EntitiesTask,
2488
2495
  EntitiesTaskParameters: EntitiesTaskParameters,
2489
- PiiTask: PiiTask,
2490
- PiiTaskParameters: PiiTaskParameters,
2491
- KeyPhrasesTask: KeyPhrasesTask,
2492
- KeyPhrasesTaskParameters: KeyPhrasesTaskParameters,
2496
+ EntitiesTaskResult: EntitiesTaskResult,
2497
+ Entity: Entity,
2498
+ EntityLinkingResult: EntityLinkingResult,
2493
2499
  EntityLinkingTask: EntityLinkingTask,
2494
2500
  EntityLinkingTaskParameters: EntityLinkingTaskParameters,
2495
- SentimentAnalysisTask: SentimentAnalysisTask,
2496
- SentimentAnalysisTaskParameters: SentimentAnalysisTaskParameters,
2501
+ EntityLinkingTaskResult: EntityLinkingTaskResult,
2497
2502
  ErrorResponse: ErrorResponse,
2498
- TextAnalyticsError: TextAnalyticsError,
2503
+ GeneratedClientAnalyzeHeaders: GeneratedClientAnalyzeHeaders,
2504
+ GeneratedClientCancelHealthJobHeaders: GeneratedClientCancelHealthJobHeaders,
2505
+ GeneratedClientHealthHeaders: GeneratedClientHealthHeaders,
2506
+ HealthcareAssertion: HealthcareAssertion,
2507
+ HealthcareEntity: HealthcareEntity,
2508
+ HealthcareEntityLink: HealthcareEntityLink,
2509
+ HealthcareEntityProperties: HealthcareEntityProperties,
2510
+ HealthcareJobState: HealthcareJobState,
2511
+ HealthcareLinkingProperties: HealthcareLinkingProperties,
2512
+ HealthcareRelation: HealthcareRelation,
2513
+ HealthcareRelationEntity: HealthcareRelationEntity,
2514
+ HealthcareResult: HealthcareResult,
2515
+ HealthcareTaskResult: HealthcareTaskResult,
2499
2516
  InnerError: InnerError,
2517
+ JobDescriptor: JobDescriptor,
2518
+ JobManifest: JobManifest,
2519
+ JobManifestTasks: JobManifestTasks,
2500
2520
  JobMetadata: JobMetadata,
2501
- AnalyzeJobDisplayName: AnalyzeJobDisplayName,
2502
- TasksState: TasksState,
2503
- TasksStateTasks: TasksStateTasks,
2504
- TaskState: TaskState,
2505
- EntitiesTaskResult: EntitiesTaskResult,
2506
- EntitiesResult: EntitiesResult,
2507
- DocumentEntities: DocumentEntities,
2508
- Entity: Entity,
2509
- TextAnalyticsWarning: TextAnalyticsWarning,
2510
- TextDocumentStatistics: TextDocumentStatistics,
2511
- DocumentError: DocumentError,
2512
- TextDocumentBatchStatistics: TextDocumentBatchStatistics,
2513
- PiiTaskResult: PiiTaskResult,
2514
- PiiResult: PiiResult,
2515
- PiiDocumentEntities: PiiDocumentEntities,
2516
- KeyPhraseTaskResult: KeyPhraseTaskResult,
2517
2521
  KeyPhraseResult: KeyPhraseResult,
2518
- DocumentKeyPhrases: DocumentKeyPhrases,
2519
- EntityLinkingTaskResult: EntityLinkingTaskResult,
2520
- EntityLinkingResult: EntityLinkingResult,
2521
- DocumentLinkedEntities: DocumentLinkedEntities,
2522
+ KeyPhraseTaskResult: KeyPhraseTaskResult,
2523
+ KeyPhrasesTask: KeyPhrasesTask,
2524
+ KeyPhrasesTaskParameters: KeyPhrasesTaskParameters,
2525
+ LanguageBatchInput: LanguageBatchInput,
2526
+ LanguageResult: LanguageResult,
2522
2527
  LinkedEntity: LinkedEntity,
2523
2528
  Match: Match,
2524
- SentimentTaskResult: SentimentTaskResult,
2525
- SentimentResponse: SentimentResponse,
2526
- DocumentSentiment: DocumentSentiment,
2527
- SentimentConfidenceScores: SentimentConfidenceScores,
2529
+ MultiLanguageBatchInput: MultiLanguageBatchInput,
2530
+ Pagination: Pagination,
2531
+ PiiDocumentEntities: PiiDocumentEntities,
2532
+ PiiResult: PiiResult,
2533
+ PiiTask: PiiTask,
2534
+ PiiTaskParameters: PiiTaskParameters,
2535
+ PiiTaskResult: PiiTaskResult,
2536
+ SentenceAssessment: SentenceAssessment,
2528
2537
  SentenceSentiment: SentenceSentiment,
2529
2538
  SentenceTarget: SentenceTarget,
2539
+ SentimentAnalysisTask: SentimentAnalysisTask,
2540
+ SentimentAnalysisTaskParameters: SentimentAnalysisTaskParameters,
2541
+ SentimentConfidenceScores: SentimentConfidenceScores,
2542
+ SentimentResponse: SentimentResponse,
2543
+ SentimentTaskResult: SentimentTaskResult,
2530
2544
  TargetConfidenceScoreLabel: TargetConfidenceScoreLabel,
2531
2545
  TargetRelation: TargetRelation,
2532
- SentenceAssessment: SentenceAssessment,
2533
- AnalyzeJobErrorsAndStatistics: AnalyzeJobErrorsAndStatistics,
2534
- Pagination: Pagination,
2535
- HealthcareTaskResult: HealthcareTaskResult,
2536
- HealthcareResult: HealthcareResult,
2537
- DocumentHealthcareEntities: DocumentHealthcareEntities,
2538
- HealthcareEntityProperties: HealthcareEntityProperties,
2539
- HealthcareLinkingProperties: HealthcareLinkingProperties,
2540
- HealthcareAssertion: HealthcareAssertion,
2541
- HealthcareEntityLink: HealthcareEntityLink,
2542
- HealthcareRelation: HealthcareRelation,
2543
- HealthcareRelationEntity: HealthcareRelationEntity,
2544
- LanguageBatchInput: LanguageBatchInput,
2545
- DetectLanguageInput: DetectLanguageInput,
2546
- LanguageResult: LanguageResult,
2547
- DocumentLanguage: DocumentLanguage,
2548
- DetectedLanguage: DetectedLanguage,
2549
- AnalyzeBatchInput: AnalyzeBatchInput,
2550
- AnalyzeJobMetadata: AnalyzeJobMetadata,
2551
- HealthcareJobState: HealthcareJobState,
2552
- AnalyzeJobState: AnalyzeJobState,
2553
- TasksStateTasksEntityRecognitionTasksItem: TasksStateTasksEntityRecognitionTasksItem,
2546
+ TaskState: TaskState,
2547
+ TasksState: TasksState,
2548
+ TasksStateTasks: TasksStateTasks,
2549
+ TasksStateTasksEntityLinkingTasksItem: TasksStateTasksEntityLinkingTasksItem,
2554
2550
  TasksStateTasksEntityRecognitionPiiTasksItem: TasksStateTasksEntityRecognitionPiiTasksItem,
2551
+ TasksStateTasksEntityRecognitionTasksItem: TasksStateTasksEntityRecognitionTasksItem,
2555
2552
  TasksStateTasksKeyPhraseExtractionTasksItem: TasksStateTasksKeyPhraseExtractionTasksItem,
2556
- TasksStateTasksEntityLinkingTasksItem: TasksStateTasksEntityLinkingTasksItem,
2557
2553
  TasksStateTasksSentimentAnalysisTasksItem: TasksStateTasksSentimentAnalysisTasksItem,
2558
- HealthcareEntity: HealthcareEntity,
2559
- GeneratedClientAnalyzeHeaders: GeneratedClientAnalyzeHeaders,
2560
- GeneratedClientCancelHealthJobHeaders: GeneratedClientCancelHealthJobHeaders,
2561
- GeneratedClientHealthHeaders: GeneratedClientHealthHeaders
2554
+ TextAnalyticsError: TextAnalyticsError,
2555
+ TextAnalyticsWarning: TextAnalyticsWarning,
2556
+ TextDocumentBatchStatistics: TextDocumentBatchStatistics,
2557
+ TextDocumentInput: TextDocumentInput,
2558
+ TextDocumentStatistics: TextDocumentStatistics
2562
2559
  });
2563
2560
 
2564
2561
  /*
@@ -3153,6 +3150,7 @@ const sentimentOperationSpec = {
3153
3150
  };
3154
3151
 
3155
3152
  // Copyright (c) Microsoft Corporation.
3153
+ // Licensed under the MIT license.
3156
3154
  /**
3157
3155
  * The `@azure/logger` configuration for this package.
3158
3156
  * @internal
@@ -3160,6 +3158,7 @@ const sentimentOperationSpec = {
3160
3158
  const logger = logger$1.createClientLogger("ai-text-analytics");
3161
3159
 
3162
3160
  // Copyright (c) Microsoft Corporation.
3161
+ // Licensed under the MIT license.
3163
3162
  /**
3164
3163
  * Given a sorted array of input objects (with a unique ID) and an unsorted array of results,
3165
3164
  * return a sorted array of results.
@@ -3357,6 +3356,7 @@ function compose(fn1, fn2) {
3357
3356
  }
3358
3357
 
3359
3358
  // Copyright (c) Microsoft Corporation.
3359
+ // Licensed under the MIT license.
3360
3360
  /**
3361
3361
  * Helper function for converting nested service error into
3362
3362
  * the unified TextAnalyticsError
@@ -3423,6 +3423,7 @@ function combineSuccessfulAndErroneousDocumentsWithStatisticsAndModelVersion(inp
3423
3423
  }
3424
3424
 
3425
3425
  // Copyright (c) Microsoft Corporation.
3426
+ // Licensed under the MIT license.
3426
3427
  /**
3427
3428
  * @internal
3428
3429
  */
@@ -3438,6 +3439,7 @@ function makeDetectLanguageErrorResult(id, error) {
3438
3439
  }
3439
3440
 
3440
3441
  // Copyright (c) Microsoft Corporation.
3442
+ // Licensed under the MIT license.
3441
3443
  /**
3442
3444
  * @internal
3443
3445
  */
@@ -3446,6 +3448,7 @@ function makeDetectLanguageResultArray(input, response) {
3446
3448
  }
3447
3449
 
3448
3450
  // Copyright (c) Microsoft Corporation.
3451
+ // Licensed under the MIT license.
3449
3452
  /**
3450
3453
  * @internal
3451
3454
  */
@@ -3461,6 +3464,7 @@ function makeRecognizeCategorizedEntitiesErrorResult(id, error) {
3461
3464
  }
3462
3465
 
3463
3466
  // Copyright (c) Microsoft Corporation.
3467
+ // Licensed under the MIT license.
3464
3468
  /**
3465
3469
  * @internal
3466
3470
  */
@@ -3469,6 +3473,7 @@ function makeRecognizeCategorizedEntitiesResultArray(input, response) {
3469
3473
  }
3470
3474
 
3471
3475
  // Copyright (c) Microsoft Corporation.
3476
+ // Licensed under the MIT license.
3472
3477
  /**
3473
3478
  * @param document - A document result coming from the service.
3474
3479
  * @internal
@@ -3540,6 +3545,7 @@ function convertTargetRelationToAssessmentSentiment(targetRelation, result) {
3540
3545
  }
3541
3546
 
3542
3547
  // Copyright (c) Microsoft Corporation.
3548
+ // Licensed under the MIT license.
3543
3549
  /**
3544
3550
  * @internal
3545
3551
  */
@@ -3548,6 +3554,7 @@ function makeAnalyzeSentimentResultArray(input, response) {
3548
3554
  }
3549
3555
 
3550
3556
  // Copyright (c) Microsoft Corporation.
3557
+ // Licensed under the MIT license.
3551
3558
  /**
3552
3559
  * @internal
3553
3560
  */
@@ -3563,6 +3570,7 @@ function makeExtractKeyPhrasesErrorResult(id, error) {
3563
3570
  }
3564
3571
 
3565
3572
  // Copyright (c) Microsoft Corporation.
3573
+ // Licensed under the MIT license.
3566
3574
  /**
3567
3575
  * @internal
3568
3576
  */
@@ -3571,6 +3579,7 @@ function makeExtractKeyPhrasesResultArray(input, response) {
3571
3579
  }
3572
3580
 
3573
3581
  // Copyright (c) Microsoft Corporation.
3582
+ // Licensed under the MIT license.
3574
3583
  /**
3575
3584
  * @internal
3576
3585
  */
@@ -3587,6 +3596,7 @@ function makeRecognizePiiEntitiesErrorResult(id, error) {
3587
3596
  }
3588
3597
 
3589
3598
  // Copyright (c) Microsoft Corporation.
3599
+ // Licensed under the MIT license.
3590
3600
  /**
3591
3601
  * @internal
3592
3602
  */
@@ -3595,6 +3605,7 @@ function makeRecognizePiiEntitiesResultArray(input, response) {
3595
3605
  }
3596
3606
 
3597
3607
  // Copyright (c) Microsoft Corporation.
3608
+ // Licensed under the MIT license.
3598
3609
  /**
3599
3610
  * @internal
3600
3611
  */
@@ -3610,6 +3621,7 @@ function makeRecognizeLinkedEntitiesErrorResult(id, error) {
3610
3621
  }
3611
3622
 
3612
3623
  // Copyright (c) Microsoft Corporation.
3624
+ // Licensed under the MIT license.
3613
3625
  /**
3614
3626
  * @internal
3615
3627
  */
@@ -3640,6 +3652,7 @@ function textAnalyticsAzureKeyCredentialPolicy(credential) {
3640
3652
  }
3641
3653
 
3642
3654
  // Copyright (c) Microsoft Corporation.
3655
+ // Licensed under the MIT license.
3643
3656
  /**
3644
3657
  * Common properties and methods of analysis Pollers.
3645
3658
  * @internal
@@ -3678,6 +3691,7 @@ class AnalysisPollOperation {
3678
3691
  }
3679
3692
 
3680
3693
  // Copyright (c) Microsoft Corporation.
3694
+ // Licensed under the MIT license.
3681
3695
  /**
3682
3696
  * Creates a user-friendly healthcare entity represented as a node in a graph
3683
3697
  * @param entity - the healthcare entity returned by the service
@@ -3728,6 +3742,7 @@ function makeHealthcareEntitiesErrorResult(id, error) {
3728
3742
  }
3729
3743
 
3730
3744
  // Copyright (c) Microsoft Corporation.
3745
+ // Licensed under the MIT license.
3731
3746
  /**
3732
3747
  * @internal
3733
3748
  */
@@ -3924,6 +3939,7 @@ class BeginAnalyzeHealthcarePollerOperation extends AnalysisPollOperation {
3924
3939
  }
3925
3940
 
3926
3941
  // Copyright (c) Microsoft Corporation.
3942
+ // Licensed under the MIT license.
3927
3943
  /**
3928
3944
  * Class that represents a poller that waits for the healthcare results.
3929
3945
  * @internal
@@ -3946,6 +3962,7 @@ class BeginAnalyzeHealthcarePoller extends AnalysisPoller {
3946
3962
  }
3947
3963
 
3948
3964
  // Copyright (c) Microsoft Corporation.
3965
+ // Licensed under the MIT license.
3949
3966
  /**
3950
3967
  * Converts the service task name (in the JSON pointer in an action error) to an action type name.
3951
3968
  * @param serviceActionType - The task type name the service uses.
@@ -4096,6 +4113,7 @@ function createAnalyzeActionsResult(response, documents) {
4096
4113
  }
4097
4114
 
4098
4115
  // Copyright (c) Microsoft Corporation.
4116
+ // Licensed under the MIT license.
4099
4117
  /**
4100
4118
  * @internal
4101
4119
  */
@@ -4257,6 +4275,7 @@ class BeginAnalyzeActionsPollerOperation extends AnalysisPollOperation {
4257
4275
  }
4258
4276
 
4259
4277
  // Copyright (c) Microsoft Corporation.
4278
+ // Licensed under the MIT license.
4260
4279
  /**
4261
4280
  * Class that represents a poller that waits for the analyze actions results.
4262
4281
  * @internal
@@ -4279,6 +4298,7 @@ class BeginAnalyzeActionsPoller extends AnalysisPoller {
4279
4298
  }
4280
4299
 
4281
4300
  // Copyright (c) Microsoft Corporation.
4301
+ // Licensed under the MIT license.
4282
4302
  const DEFAULT_COGNITIVE_SCOPE = "https://cognitiveservices.azure.com/.default";
4283
4303
  /**
4284
4304
  * The types of PII domains the user can choose from.