@azure/ai-language-text 1.0.1-alpha.20220908.7 → 1.0.1-alpha.20220914.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2648,10 +2648,10 @@ const KeyPhraseResultDocumentsItem = {
2648
2648
  modelProperties: Object.assign({}, KeyPhrasesDocumentResult.type.modelProperties)
2649
2649
  }
2650
2650
  };
2651
- const AnalyzeTextSubmitJobHeaders = {
2651
+ const GeneratedClientAnalyzeBatchHeaders = {
2652
2652
  type: {
2653
2653
  name: "Composite",
2654
- className: "AnalyzeTextSubmitJobHeaders",
2654
+ className: "GeneratedClientAnalyzeBatchHeaders",
2655
2655
  modelProperties: {
2656
2656
  operationLocation: {
2657
2657
  serializedName: "operation-location",
@@ -2827,7 +2827,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
2827
2827
  EntityLinkingResultDocumentsItem: EntityLinkingResultDocumentsItem,
2828
2828
  PiiResultDocumentsItem: PiiResultDocumentsItem,
2829
2829
  KeyPhraseResultDocumentsItem: KeyPhraseResultDocumentsItem,
2830
- AnalyzeTextSubmitJobHeaders: AnalyzeTextSubmitJobHeaders,
2830
+ GeneratedClientAnalyzeBatchHeaders: GeneratedClientAnalyzeBatchHeaders,
2831
2831
  AnalyzeTextCancelJobHeaders: AnalyzeTextCancelJobHeaders,
2832
2832
  discriminators: discriminators
2833
2833
  });
@@ -3267,7 +3267,7 @@ function createAnalyzeBatchLro(settings) {
3267
3267
  const { client, commonOptions, documents, initialRequestOptions, pollRequestOptions, tasks, tracing, } = settings;
3268
3268
  return {
3269
3269
  async sendInitialRequest() {
3270
- return tracing.withSpan(`${clientName}.beginAnalyzeBatch`, Object.assign(Object.assign({}, commonOptions), initialRequestOptions), async (finalOptions) => throwError(getRawResponse((paramOptions) => client.analyzeText.submitJob({
3270
+ return tracing.withSpan(`${clientName}.beginAnalyzeBatch`, Object.assign(Object.assign({}, commonOptions), initialRequestOptions), async (finalOptions) => throwError(getRawResponse((paramOptions) => client.analyzeBatch({
3271
3271
  tasks,
3272
3272
  analysisInput: {
3273
3273
  documents,
@@ -3389,15 +3389,6 @@ class AnalyzeTextImpl {
3389
3389
  constructor(client) {
3390
3390
  this.client = client;
3391
3391
  }
3392
- /**
3393
- * Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed
3394
- * as a long-running operation.
3395
- * @param body Collection of documents to analyze and one or more tasks to execute.
3396
- * @param options The options parameters.
3397
- */
3398
- submitJob(body, options) {
3399
- return this.client.sendOperationRequest({ body, options }, submitJobOperationSpec);
3400
- }
3401
3392
  /**
3402
3393
  * Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are
3403
3394
  * succeeded, the job will transition to the succeeded state and results will be available for each
@@ -3419,24 +3410,6 @@ class AnalyzeTextImpl {
3419
3410
  }
3420
3411
  // Operation Specifications
3421
3412
  const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
3422
- const submitJobOperationSpec = {
3423
- path: "/analyze-text/jobs",
3424
- httpMethod: "POST",
3425
- responses: {
3426
- 202: {
3427
- headersMapper: AnalyzeTextSubmitJobHeaders
3428
- },
3429
- default: {
3430
- bodyMapper: ErrorResponse
3431
- }
3432
- },
3433
- requestBody: body1,
3434
- queryParameters: [apiVersion],
3435
- urlParameters: [endpoint],
3436
- headerParameters: [contentType, accept],
3437
- mediaType: "json",
3438
- serializer: serializer$1
3439
- };
3440
3413
  const jobStatusOperationSpec = {
3441
3414
  path: "/analyze-text/jobs/{jobId}",
3442
3415
  httpMethod: "GET",
@@ -3567,6 +3540,15 @@ class GeneratedClient extends coreClient__namespace.ServiceClient {
3567
3540
  analyze(body, options) {
3568
3541
  return this.sendOperationRequest({ body, options }, analyzeOperationSpec);
3569
3542
  }
3543
+ /**
3544
+ * Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed
3545
+ * as a long-running operation.
3546
+ * @param body Collection of documents to analyze and one or more tasks to execute.
3547
+ * @param options The options parameters.
3548
+ */
3549
+ analyzeBatch(body, options) {
3550
+ return this.sendOperationRequest({ body, options }, analyzeBatchOperationSpec);
3551
+ }
3570
3552
  }
3571
3553
  // Operation Specifications
3572
3554
  const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
@@ -3588,6 +3570,24 @@ const analyzeOperationSpec = {
3588
3570
  mediaType: "json",
3589
3571
  serializer
3590
3572
  };
3573
+ const analyzeBatchOperationSpec = {
3574
+ path: "/analyze-text/jobs",
3575
+ httpMethod: "POST",
3576
+ responses: {
3577
+ 202: {
3578
+ headersMapper: GeneratedClientAnalyzeBatchHeaders
3579
+ },
3580
+ default: {
3581
+ bodyMapper: ErrorResponse
3582
+ }
3583
+ },
3584
+ requestBody: body1,
3585
+ queryParameters: [apiVersion],
3586
+ urlParameters: [endpoint],
3587
+ headerParameters: [contentType, accept],
3588
+ mediaType: "json",
3589
+ serializer
3590
+ };
3591
3591
 
3592
3592
  // Copyright (c) Microsoft Corporation.
3593
3593
  // Licensed under the MIT license.