@azure/search-documents 11.3.0-beta.6 → 11.3.0-beta.7

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 (30) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.js +492 -104
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/constants.js +1 -1
  5. package/dist-esm/src/constants.js.map +1 -1
  6. package/dist-esm/src/generated/data/searchClientContext.js +1 -1
  7. package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
  8. package/dist-esm/src/generated/service/models/index.js.map +1 -1
  9. package/dist-esm/src/generated/service/models/mappers.js +62 -0
  10. package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
  11. package/dist-esm/src/generated/service/models/parameters.js +15 -1
  12. package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
  13. package/dist-esm/src/generated/service/operations/aliases.js +166 -0
  14. package/dist-esm/src/generated/service/operations/aliases.js.map +1 -0
  15. package/dist-esm/src/generated/service/operations/index.js +1 -0
  16. package/dist-esm/src/generated/service/operations/index.js.map +1 -1
  17. package/dist-esm/src/generated/service/operationsInterfaces/aliases.js +9 -0
  18. package/dist-esm/src/generated/service/operationsInterfaces/aliases.js.map +1 -0
  19. package/dist-esm/src/generated/service/operationsInterfaces/index.js +1 -0
  20. package/dist-esm/src/generated/service/operationsInterfaces/index.js.map +1 -1
  21. package/dist-esm/src/generated/service/searchServiceClient.js +2 -1
  22. package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
  23. package/dist-esm/src/generated/service/searchServiceClientContext.js +1 -1
  24. package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
  25. package/dist-esm/src/index.js.map +1 -1
  26. package/dist-esm/src/searchIndexClient.js +149 -3
  27. package/dist-esm/src/searchIndexClient.js.map +1 -1
  28. package/dist-esm/src/serviceModels.js.map +1 -1
  29. package/package.json +6 -6
  30. package/types/search-documents.d.ts +91 -0
package/dist/index.js CHANGED
@@ -1447,7 +1447,7 @@ class DocumentsImpl {
1447
1447
  * @param options The options parameters.
1448
1448
  */
1449
1449
  get(key, options) {
1450
- return this.client.sendOperationRequest({ key, options }, getOperationSpec$5);
1450
+ return this.client.sendOperationRequest({ key, options }, getOperationSpec$6);
1451
1451
  }
1452
1452
  /**
1453
1453
  * Suggests documents in the index that match the given partial query text.
@@ -1496,7 +1496,7 @@ class DocumentsImpl {
1496
1496
  }
1497
1497
  }
1498
1498
  // Operation Specifications
1499
- const serializer$6 = coreClient__namespace.createSerializer(Mappers$1, /* isXml */ false);
1499
+ const serializer$7 = coreClient__namespace.createSerializer(Mappers$1, /* isXml */ false);
1500
1500
  const countOperationSpec = {
1501
1501
  path: "/docs/$count",
1502
1502
  httpMethod: "GET",
@@ -1511,7 +1511,7 @@ const countOperationSpec = {
1511
1511
  queryParameters: [apiVersion$1],
1512
1512
  urlParameters: [endpoint$1, indexName$1],
1513
1513
  headerParameters: [accept$1, xMsClientRequestId$1],
1514
- serializer: serializer$6
1514
+ serializer: serializer$7
1515
1515
  };
1516
1516
  const searchGetOperationSpec = {
1517
1517
  path: "/docs",
@@ -1554,7 +1554,7 @@ const searchGetOperationSpec = {
1554
1554
  ],
1555
1555
  urlParameters: [endpoint$1, indexName$1],
1556
1556
  headerParameters: [accept$1, xMsClientRequestId$1],
1557
- serializer: serializer$6
1557
+ serializer: serializer$7
1558
1558
  };
1559
1559
  const searchPostOperationSpec = {
1560
1560
  path: "/docs/search.post.search",
@@ -1576,9 +1576,9 @@ const searchPostOperationSpec = {
1576
1576
  contentType$1
1577
1577
  ],
1578
1578
  mediaType: "json",
1579
- serializer: serializer$6
1579
+ serializer: serializer$7
1580
1580
  };
1581
- const getOperationSpec$5 = {
1581
+ const getOperationSpec$6 = {
1582
1582
  path: "/docs('{key}')",
1583
1583
  httpMethod: "GET",
1584
1584
  responses: {
@@ -1594,7 +1594,7 @@ const getOperationSpec$5 = {
1594
1594
  queryParameters: [apiVersion$1, selectedFields],
1595
1595
  urlParameters: [endpoint$1, indexName$1, key],
1596
1596
  headerParameters: [accept$1, xMsClientRequestId$1],
1597
- serializer: serializer$6
1597
+ serializer: serializer$7
1598
1598
  };
1599
1599
  const suggestGetOperationSpec = {
1600
1600
  path: "/docs/search.suggest",
@@ -1623,7 +1623,7 @@ const suggestGetOperationSpec = {
1623
1623
  ],
1624
1624
  urlParameters: [endpoint$1, indexName$1],
1625
1625
  headerParameters: [accept$1, xMsClientRequestId$1],
1626
- serializer: serializer$6
1626
+ serializer: serializer$7
1627
1627
  };
1628
1628
  const suggestPostOperationSpec = {
1629
1629
  path: "/docs/search.post.suggest",
@@ -1645,7 +1645,7 @@ const suggestPostOperationSpec = {
1645
1645
  contentType$1
1646
1646
  ],
1647
1647
  mediaType: "json",
1648
- serializer: serializer$6
1648
+ serializer: serializer$7
1649
1649
  };
1650
1650
  const indexOperationSpec = {
1651
1651
  path: "/docs/search.index",
@@ -1670,7 +1670,7 @@ const indexOperationSpec = {
1670
1670
  contentType$1
1671
1671
  ],
1672
1672
  mediaType: "json",
1673
- serializer: serializer$6
1673
+ serializer: serializer$7
1674
1674
  };
1675
1675
  const autocompleteGetOperationSpec = {
1676
1676
  path: "/docs/search.autocomplete",
@@ -1698,7 +1698,7 @@ const autocompleteGetOperationSpec = {
1698
1698
  ],
1699
1699
  urlParameters: [endpoint$1, indexName$1],
1700
1700
  headerParameters: [accept$1, xMsClientRequestId$1],
1701
- serializer: serializer$6
1701
+ serializer: serializer$7
1702
1702
  };
1703
1703
  const autocompletePostOperationSpec = {
1704
1704
  path: "/docs/search.post.autocomplete",
@@ -1720,7 +1720,7 @@ const autocompletePostOperationSpec = {
1720
1720
  contentType$1
1721
1721
  ],
1722
1722
  mediaType: "json",
1723
- serializer: serializer$6
1723
+ serializer: serializer$7
1724
1724
  };
1725
1725
 
1726
1726
  /*
@@ -1756,7 +1756,7 @@ class SearchClientContext extends coreClient__namespace.ServiceClient {
1756
1756
  const defaults = {
1757
1757
  requestContentType: "application/json; charset=utf-8"
1758
1758
  };
1759
- const packageDetails = `azsdk-js-search-documents/11.3.0-beta.6`;
1759
+ const packageDetails = `azsdk-js-search-documents/11.3.0-beta.7`;
1760
1760
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1761
1761
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1762
1762
  : `${packageDetails}`;
@@ -1815,7 +1815,7 @@ function createSearchApiKeyCredentialPolicy(credential) {
1815
1815
 
1816
1816
  // Copyright (c) Microsoft Corporation.
1817
1817
  // Licensed under the MIT license.
1818
- const SDK_VERSION = "11.3.0-beta.6";
1818
+ const SDK_VERSION = "11.3.0-beta.7";
1819
1819
 
1820
1820
  // Copyright (c) Microsoft Corporation.
1821
1821
  /**
@@ -6375,6 +6375,61 @@ const AnalyzedTokenInfo = {
6375
6375
  }
6376
6376
  }
6377
6377
  };
6378
+ const SearchAlias = {
6379
+ type: {
6380
+ name: "Composite",
6381
+ className: "SearchAlias",
6382
+ modelProperties: {
6383
+ name: {
6384
+ serializedName: "name",
6385
+ required: true,
6386
+ type: {
6387
+ name: "String"
6388
+ }
6389
+ },
6390
+ indexes: {
6391
+ serializedName: "indexes",
6392
+ required: true,
6393
+ type: {
6394
+ name: "Sequence",
6395
+ element: {
6396
+ type: {
6397
+ name: "String"
6398
+ }
6399
+ }
6400
+ }
6401
+ },
6402
+ etag: {
6403
+ serializedName: "@odata\\.etag",
6404
+ type: {
6405
+ name: "String"
6406
+ }
6407
+ }
6408
+ }
6409
+ }
6410
+ };
6411
+ const ListAliasesResult = {
6412
+ type: {
6413
+ name: "Composite",
6414
+ className: "ListAliasesResult",
6415
+ modelProperties: {
6416
+ aliases: {
6417
+ serializedName: "value",
6418
+ required: true,
6419
+ readOnly: true,
6420
+ type: {
6421
+ name: "Sequence",
6422
+ element: {
6423
+ type: {
6424
+ name: "Composite",
6425
+ className: "SearchAlias"
6426
+ }
6427
+ }
6428
+ }
6429
+ }
6430
+ }
6431
+ }
6432
+ };
6378
6433
  const ServiceStatistics = {
6379
6434
  type: {
6380
6435
  name: "Composite",
@@ -6402,6 +6457,13 @@ const ServiceCounters = {
6402
6457
  name: "Composite",
6403
6458
  className: "ServiceCounters",
6404
6459
  modelProperties: {
6460
+ aliasCounter: {
6461
+ serializedName: "aliasesCount",
6462
+ type: {
6463
+ name: "Composite",
6464
+ className: "ResourceCounter"
6465
+ }
6466
+ },
6405
6467
  documentCounter: {
6406
6468
  serializedName: "documentCount",
6407
6469
  type: {
@@ -9166,6 +9228,8 @@ var Mappers = /*#__PURE__*/Object.freeze({
9166
9228
  AnalyzeRequest: AnalyzeRequest,
9167
9229
  AnalyzeResult: AnalyzeResult,
9168
9230
  AnalyzedTokenInfo: AnalyzedTokenInfo,
9231
+ SearchAlias: SearchAlias,
9232
+ ListAliasesResult: ListAliasesResult,
9169
9233
  ServiceStatistics: ServiceStatistics,
9170
9234
  ServiceCounters: ServiceCounters,
9171
9235
  ResourceCounter: ResourceCounter,
@@ -9475,6 +9539,20 @@ const request = {
9475
9539
  parameterPath: "request",
9476
9540
  mapper: AnalyzeRequest
9477
9541
  };
9542
+ const alias = {
9543
+ parameterPath: "alias",
9544
+ mapper: SearchAlias
9545
+ };
9546
+ const aliasName = {
9547
+ parameterPath: "aliasName",
9548
+ mapper: {
9549
+ serializedName: "aliasName",
9550
+ required: true,
9551
+ type: {
9552
+ name: "String"
9553
+ }
9554
+ }
9555
+ };
9478
9556
 
9479
9557
  /*
9480
9558
  * Copyright (c) Microsoft Corporation.
@@ -9499,7 +9577,7 @@ class DataSourcesImpl {
9499
9577
  * @param options The options parameters.
9500
9578
  */
9501
9579
  createOrUpdate(dataSourceName, dataSource, options) {
9502
- return this.client.sendOperationRequest({ dataSourceName, dataSource, options }, createOrUpdateOperationSpec$4);
9580
+ return this.client.sendOperationRequest({ dataSourceName, dataSource, options }, createOrUpdateOperationSpec$5);
9503
9581
  }
9504
9582
  /**
9505
9583
  * Deletes a datasource.
@@ -9507,7 +9585,7 @@ class DataSourcesImpl {
9507
9585
  * @param options The options parameters.
9508
9586
  */
9509
9587
  delete(dataSourceName, options) {
9510
- return this.client.sendOperationRequest({ dataSourceName, options }, deleteOperationSpec$4);
9588
+ return this.client.sendOperationRequest({ dataSourceName, options }, deleteOperationSpec$5);
9511
9589
  }
9512
9590
  /**
9513
9591
  * Retrieves a datasource definition.
@@ -9515,14 +9593,14 @@ class DataSourcesImpl {
9515
9593
  * @param options The options parameters.
9516
9594
  */
9517
9595
  get(dataSourceName, options) {
9518
- return this.client.sendOperationRequest({ dataSourceName, options }, getOperationSpec$4);
9596
+ return this.client.sendOperationRequest({ dataSourceName, options }, getOperationSpec$5);
9519
9597
  }
9520
9598
  /**
9521
9599
  * Lists all datasources available for a search service.
9522
9600
  * @param options The options parameters.
9523
9601
  */
9524
9602
  list(options) {
9525
- return this.client.sendOperationRequest({ options }, listOperationSpec$4);
9603
+ return this.client.sendOperationRequest({ options }, listOperationSpec$5);
9526
9604
  }
9527
9605
  /**
9528
9606
  * Creates a new datasource.
@@ -9530,12 +9608,12 @@ class DataSourcesImpl {
9530
9608
  * @param options The options parameters.
9531
9609
  */
9532
9610
  create(dataSource, options) {
9533
- return this.client.sendOperationRequest({ dataSource, options }, createOperationSpec$4);
9611
+ return this.client.sendOperationRequest({ dataSource, options }, createOperationSpec$5);
9534
9612
  }
9535
9613
  }
9536
9614
  // Operation Specifications
9537
- const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
9538
- const createOrUpdateOperationSpec$4 = {
9615
+ const serializer$6 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
9616
+ const createOrUpdateOperationSpec$5 = {
9539
9617
  path: "/datasources('{dataSourceName}')",
9540
9618
  httpMethod: "PUT",
9541
9619
  responses: {
@@ -9564,9 +9642,9 @@ const createOrUpdateOperationSpec$4 = {
9564
9642
  prefer
9565
9643
  ],
9566
9644
  mediaType: "json",
9567
- serializer: serializer$5
9645
+ serializer: serializer$6
9568
9646
  };
9569
- const deleteOperationSpec$4 = {
9647
+ const deleteOperationSpec$5 = {
9570
9648
  path: "/datasources('{dataSourceName}')",
9571
9649
  httpMethod: "DELETE",
9572
9650
  responses: {
@@ -9584,9 +9662,9 @@ const deleteOperationSpec$4 = {
9584
9662
  ifMatch,
9585
9663
  ifNoneMatch
9586
9664
  ],
9587
- serializer: serializer$5
9665
+ serializer: serializer$6
9588
9666
  };
9589
- const getOperationSpec$4 = {
9667
+ const getOperationSpec$5 = {
9590
9668
  path: "/datasources('{dataSourceName}')",
9591
9669
  httpMethod: "GET",
9592
9670
  responses: {
@@ -9600,9 +9678,9 @@ const getOperationSpec$4 = {
9600
9678
  queryParameters: [apiVersion],
9601
9679
  urlParameters: [endpoint, dataSourceName],
9602
9680
  headerParameters: [accept, xMsClientRequestId],
9603
- serializer: serializer$5
9681
+ serializer: serializer$6
9604
9682
  };
9605
- const listOperationSpec$4 = {
9683
+ const listOperationSpec$5 = {
9606
9684
  path: "/datasources",
9607
9685
  httpMethod: "GET",
9608
9686
  responses: {
@@ -9616,9 +9694,9 @@ const listOperationSpec$4 = {
9616
9694
  queryParameters: [apiVersion, select],
9617
9695
  urlParameters: [endpoint],
9618
9696
  headerParameters: [accept, xMsClientRequestId],
9619
- serializer: serializer$5
9697
+ serializer: serializer$6
9620
9698
  };
9621
- const createOperationSpec$4 = {
9699
+ const createOperationSpec$5 = {
9622
9700
  path: "/datasources",
9623
9701
  httpMethod: "POST",
9624
9702
  responses: {
@@ -9638,7 +9716,7 @@ const createOperationSpec$4 = {
9638
9716
  xMsClientRequestId
9639
9717
  ],
9640
9718
  mediaType: "json",
9641
- serializer: serializer$5
9719
+ serializer: serializer$6
9642
9720
  };
9643
9721
 
9644
9722
  /*
@@ -9688,7 +9766,7 @@ class IndexersImpl {
9688
9766
  * @param options The options parameters.
9689
9767
  */
9690
9768
  createOrUpdate(indexerName, indexer, options) {
9691
- return this.client.sendOperationRequest({ indexerName, indexer, options }, createOrUpdateOperationSpec$3);
9769
+ return this.client.sendOperationRequest({ indexerName, indexer, options }, createOrUpdateOperationSpec$4);
9692
9770
  }
9693
9771
  /**
9694
9772
  * Deletes an indexer.
@@ -9696,7 +9774,7 @@ class IndexersImpl {
9696
9774
  * @param options The options parameters.
9697
9775
  */
9698
9776
  delete(indexerName, options) {
9699
- return this.client.sendOperationRequest({ indexerName, options }, deleteOperationSpec$3);
9777
+ return this.client.sendOperationRequest({ indexerName, options }, deleteOperationSpec$4);
9700
9778
  }
9701
9779
  /**
9702
9780
  * Retrieves an indexer definition.
@@ -9704,14 +9782,14 @@ class IndexersImpl {
9704
9782
  * @param options The options parameters.
9705
9783
  */
9706
9784
  get(indexerName, options) {
9707
- return this.client.sendOperationRequest({ indexerName, options }, getOperationSpec$3);
9785
+ return this.client.sendOperationRequest({ indexerName, options }, getOperationSpec$4);
9708
9786
  }
9709
9787
  /**
9710
9788
  * Lists all indexers available for a search service.
9711
9789
  * @param options The options parameters.
9712
9790
  */
9713
9791
  list(options) {
9714
- return this.client.sendOperationRequest({ options }, listOperationSpec$3);
9792
+ return this.client.sendOperationRequest({ options }, listOperationSpec$4);
9715
9793
  }
9716
9794
  /**
9717
9795
  * Creates a new indexer.
@@ -9719,7 +9797,7 @@ class IndexersImpl {
9719
9797
  * @param options The options parameters.
9720
9798
  */
9721
9799
  create(indexer, options) {
9722
- return this.client.sendOperationRequest({ indexer, options }, createOperationSpec$3);
9800
+ return this.client.sendOperationRequest({ indexer, options }, createOperationSpec$4);
9723
9801
  }
9724
9802
  /**
9725
9803
  * Returns the current status and execution history of an indexer.
@@ -9731,7 +9809,7 @@ class IndexersImpl {
9731
9809
  }
9732
9810
  }
9733
9811
  // Operation Specifications
9734
- const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
9812
+ const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
9735
9813
  const resetOperationSpec = {
9736
9814
  path: "/indexers('{indexerName}')/search.reset",
9737
9815
  httpMethod: "POST",
@@ -9744,7 +9822,7 @@ const resetOperationSpec = {
9744
9822
  queryParameters: [apiVersion],
9745
9823
  urlParameters: [endpoint, indexerName],
9746
9824
  headerParameters: [accept, xMsClientRequestId],
9747
- serializer: serializer$4
9825
+ serializer: serializer$5
9748
9826
  };
9749
9827
  const resetDocsOperationSpec = {
9750
9828
  path: "/indexers('{indexerName}')/search.resetdocs",
@@ -9764,7 +9842,7 @@ const resetDocsOperationSpec = {
9764
9842
  xMsClientRequestId
9765
9843
  ],
9766
9844
  mediaType: "json",
9767
- serializer: serializer$4
9845
+ serializer: serializer$5
9768
9846
  };
9769
9847
  const runOperationSpec = {
9770
9848
  path: "/indexers('{indexerName}')/search.run",
@@ -9778,9 +9856,9 @@ const runOperationSpec = {
9778
9856
  queryParameters: [apiVersion],
9779
9857
  urlParameters: [endpoint, indexerName],
9780
9858
  headerParameters: [accept, xMsClientRequestId],
9781
- serializer: serializer$4
9859
+ serializer: serializer$5
9782
9860
  };
9783
- const createOrUpdateOperationSpec$3 = {
9861
+ const createOrUpdateOperationSpec$4 = {
9784
9862
  path: "/indexers('{indexerName}')",
9785
9863
  httpMethod: "PUT",
9786
9864
  responses: {
@@ -9810,9 +9888,9 @@ const createOrUpdateOperationSpec$3 = {
9810
9888
  prefer
9811
9889
  ],
9812
9890
  mediaType: "json",
9813
- serializer: serializer$4
9891
+ serializer: serializer$5
9814
9892
  };
9815
- const deleteOperationSpec$3 = {
9893
+ const deleteOperationSpec$4 = {
9816
9894
  path: "/indexers('{indexerName}')",
9817
9895
  httpMethod: "DELETE",
9818
9896
  responses: {
@@ -9830,9 +9908,9 @@ const deleteOperationSpec$3 = {
9830
9908
  ifMatch,
9831
9909
  ifNoneMatch
9832
9910
  ],
9833
- serializer: serializer$4
9911
+ serializer: serializer$5
9834
9912
  };
9835
- const getOperationSpec$3 = {
9913
+ const getOperationSpec$4 = {
9836
9914
  path: "/indexers('{indexerName}')",
9837
9915
  httpMethod: "GET",
9838
9916
  responses: {
@@ -9846,9 +9924,9 @@ const getOperationSpec$3 = {
9846
9924
  queryParameters: [apiVersion],
9847
9925
  urlParameters: [endpoint, indexerName],
9848
9926
  headerParameters: [accept, xMsClientRequestId],
9849
- serializer: serializer$4
9927
+ serializer: serializer$5
9850
9928
  };
9851
- const listOperationSpec$3 = {
9929
+ const listOperationSpec$4 = {
9852
9930
  path: "/indexers",
9853
9931
  httpMethod: "GET",
9854
9932
  responses: {
@@ -9862,9 +9940,9 @@ const listOperationSpec$3 = {
9862
9940
  queryParameters: [apiVersion, select],
9863
9941
  urlParameters: [endpoint],
9864
9942
  headerParameters: [accept, xMsClientRequestId],
9865
- serializer: serializer$4
9943
+ serializer: serializer$5
9866
9944
  };
9867
- const createOperationSpec$3 = {
9945
+ const createOperationSpec$4 = {
9868
9946
  path: "/indexers",
9869
9947
  httpMethod: "POST",
9870
9948
  responses: {
@@ -9884,7 +9962,7 @@ const createOperationSpec$3 = {
9884
9962
  xMsClientRequestId
9885
9963
  ],
9886
9964
  mediaType: "json",
9887
- serializer: serializer$4
9965
+ serializer: serializer$5
9888
9966
  };
9889
9967
  const getStatusOperationSpec = {
9890
9968
  path: "/indexers('{indexerName}')/search.status",
@@ -9900,7 +9978,7 @@ const getStatusOperationSpec = {
9900
9978
  queryParameters: [apiVersion],
9901
9979
  urlParameters: [endpoint, indexerName],
9902
9980
  headerParameters: [accept, xMsClientRequestId],
9903
- serializer: serializer$4
9981
+ serializer: serializer$5
9904
9982
  };
9905
9983
 
9906
9984
  /*
@@ -9926,7 +10004,7 @@ class SkillsetsImpl {
9926
10004
  * @param options The options parameters.
9927
10005
  */
9928
10006
  createOrUpdate(skillsetName, skillset, options) {
9929
- return this.client.sendOperationRequest({ skillsetName, skillset, options }, createOrUpdateOperationSpec$2);
10007
+ return this.client.sendOperationRequest({ skillsetName, skillset, options }, createOrUpdateOperationSpec$3);
9930
10008
  }
9931
10009
  /**
9932
10010
  * Deletes a skillset in a search service.
@@ -9934,7 +10012,7 @@ class SkillsetsImpl {
9934
10012
  * @param options The options parameters.
9935
10013
  */
9936
10014
  delete(skillsetName, options) {
9937
- return this.client.sendOperationRequest({ skillsetName, options }, deleteOperationSpec$2);
10015
+ return this.client.sendOperationRequest({ skillsetName, options }, deleteOperationSpec$3);
9938
10016
  }
9939
10017
  /**
9940
10018
  * Retrieves a skillset in a search service.
@@ -9942,14 +10020,14 @@ class SkillsetsImpl {
9942
10020
  * @param options The options parameters.
9943
10021
  */
9944
10022
  get(skillsetName, options) {
9945
- return this.client.sendOperationRequest({ skillsetName, options }, getOperationSpec$2);
10023
+ return this.client.sendOperationRequest({ skillsetName, options }, getOperationSpec$3);
9946
10024
  }
9947
10025
  /**
9948
10026
  * List all skillsets in a search service.
9949
10027
  * @param options The options parameters.
9950
10028
  */
9951
10029
  list(options) {
9952
- return this.client.sendOperationRequest({ options }, listOperationSpec$2);
10030
+ return this.client.sendOperationRequest({ options }, listOperationSpec$3);
9953
10031
  }
9954
10032
  /**
9955
10033
  * Creates a new skillset in a search service.
@@ -9957,7 +10035,7 @@ class SkillsetsImpl {
9957
10035
  * @param options The options parameters.
9958
10036
  */
9959
10037
  create(skillset, options) {
9960
- return this.client.sendOperationRequest({ skillset, options }, createOperationSpec$2);
10038
+ return this.client.sendOperationRequest({ skillset, options }, createOperationSpec$3);
9961
10039
  }
9962
10040
  /**
9963
10041
  * Reset an existing skillset in a search service.
@@ -9970,8 +10048,8 @@ class SkillsetsImpl {
9970
10048
  }
9971
10049
  }
9972
10050
  // Operation Specifications
9973
- const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
9974
- const createOrUpdateOperationSpec$2 = {
10051
+ const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10052
+ const createOrUpdateOperationSpec$3 = {
9975
10053
  path: "/skillsets('{skillsetName}')",
9976
10054
  httpMethod: "PUT",
9977
10055
  responses: {
@@ -10001,9 +10079,9 @@ const createOrUpdateOperationSpec$2 = {
10001
10079
  prefer
10002
10080
  ],
10003
10081
  mediaType: "json",
10004
- serializer: serializer$3
10082
+ serializer: serializer$4
10005
10083
  };
10006
- const deleteOperationSpec$2 = {
10084
+ const deleteOperationSpec$3 = {
10007
10085
  path: "/skillsets('{skillsetName}')",
10008
10086
  httpMethod: "DELETE",
10009
10087
  responses: {
@@ -10021,9 +10099,9 @@ const deleteOperationSpec$2 = {
10021
10099
  ifMatch,
10022
10100
  ifNoneMatch
10023
10101
  ],
10024
- serializer: serializer$3
10102
+ serializer: serializer$4
10025
10103
  };
10026
- const getOperationSpec$2 = {
10104
+ const getOperationSpec$3 = {
10027
10105
  path: "/skillsets('{skillsetName}')",
10028
10106
  httpMethod: "GET",
10029
10107
  responses: {
@@ -10037,9 +10115,9 @@ const getOperationSpec$2 = {
10037
10115
  queryParameters: [apiVersion],
10038
10116
  urlParameters: [endpoint, skillsetName],
10039
10117
  headerParameters: [accept, xMsClientRequestId],
10040
- serializer: serializer$3
10118
+ serializer: serializer$4
10041
10119
  };
10042
- const listOperationSpec$2 = {
10120
+ const listOperationSpec$3 = {
10043
10121
  path: "/skillsets",
10044
10122
  httpMethod: "GET",
10045
10123
  responses: {
@@ -10053,9 +10131,9 @@ const listOperationSpec$2 = {
10053
10131
  queryParameters: [apiVersion, select],
10054
10132
  urlParameters: [endpoint],
10055
10133
  headerParameters: [accept, xMsClientRequestId],
10056
- serializer: serializer$3
10134
+ serializer: serializer$4
10057
10135
  };
10058
- const createOperationSpec$2 = {
10136
+ const createOperationSpec$3 = {
10059
10137
  path: "/skillsets",
10060
10138
  httpMethod: "POST",
10061
10139
  responses: {
@@ -10075,7 +10153,7 @@ const createOperationSpec$2 = {
10075
10153
  xMsClientRequestId
10076
10154
  ],
10077
10155
  mediaType: "json",
10078
- serializer: serializer$3
10156
+ serializer: serializer$4
10079
10157
  };
10080
10158
  const resetSkillsOperationSpec = {
10081
10159
  path: "/skillsets('{skillsetName}')/search.resetskills",
@@ -10095,7 +10173,7 @@ const resetSkillsOperationSpec = {
10095
10173
  xMsClientRequestId
10096
10174
  ],
10097
10175
  mediaType: "json",
10098
- serializer: serializer$3
10176
+ serializer: serializer$4
10099
10177
  };
10100
10178
 
10101
10179
  /*
@@ -10121,7 +10199,7 @@ class SynonymMapsImpl {
10121
10199
  * @param options The options parameters.
10122
10200
  */
10123
10201
  createOrUpdate(synonymMapName, synonymMap, options) {
10124
- return this.client.sendOperationRequest({ synonymMapName, synonymMap, options }, createOrUpdateOperationSpec$1);
10202
+ return this.client.sendOperationRequest({ synonymMapName, synonymMap, options }, createOrUpdateOperationSpec$2);
10125
10203
  }
10126
10204
  /**
10127
10205
  * Deletes a synonym map.
@@ -10129,7 +10207,7 @@ class SynonymMapsImpl {
10129
10207
  * @param options The options parameters.
10130
10208
  */
10131
10209
  delete(synonymMapName, options) {
10132
- return this.client.sendOperationRequest({ synonymMapName, options }, deleteOperationSpec$1);
10210
+ return this.client.sendOperationRequest({ synonymMapName, options }, deleteOperationSpec$2);
10133
10211
  }
10134
10212
  /**
10135
10213
  * Retrieves a synonym map definition.
@@ -10137,14 +10215,14 @@ class SynonymMapsImpl {
10137
10215
  * @param options The options parameters.
10138
10216
  */
10139
10217
  get(synonymMapName, options) {
10140
- return this.client.sendOperationRequest({ synonymMapName, options }, getOperationSpec$1);
10218
+ return this.client.sendOperationRequest({ synonymMapName, options }, getOperationSpec$2);
10141
10219
  }
10142
10220
  /**
10143
10221
  * Lists all synonym maps available for a search service.
10144
10222
  * @param options The options parameters.
10145
10223
  */
10146
10224
  list(options) {
10147
- return this.client.sendOperationRequest({ options }, listOperationSpec$1);
10225
+ return this.client.sendOperationRequest({ options }, listOperationSpec$2);
10148
10226
  }
10149
10227
  /**
10150
10228
  * Creates a new synonym map.
@@ -10152,12 +10230,12 @@ class SynonymMapsImpl {
10152
10230
  * @param options The options parameters.
10153
10231
  */
10154
10232
  create(synonymMap, options) {
10155
- return this.client.sendOperationRequest({ synonymMap, options }, createOperationSpec$1);
10233
+ return this.client.sendOperationRequest({ synonymMap, options }, createOperationSpec$2);
10156
10234
  }
10157
10235
  }
10158
10236
  // Operation Specifications
10159
- const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10160
- const createOrUpdateOperationSpec$1 = {
10237
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10238
+ const createOrUpdateOperationSpec$2 = {
10161
10239
  path: "/synonymmaps('{synonymMapName}')",
10162
10240
  httpMethod: "PUT",
10163
10241
  responses: {
@@ -10183,9 +10261,9 @@ const createOrUpdateOperationSpec$1 = {
10183
10261
  prefer
10184
10262
  ],
10185
10263
  mediaType: "json",
10186
- serializer: serializer$2
10264
+ serializer: serializer$3
10187
10265
  };
10188
- const deleteOperationSpec$1 = {
10266
+ const deleteOperationSpec$2 = {
10189
10267
  path: "/synonymmaps('{synonymMapName}')",
10190
10268
  httpMethod: "DELETE",
10191
10269
  responses: {
@@ -10203,9 +10281,9 @@ const deleteOperationSpec$1 = {
10203
10281
  ifMatch,
10204
10282
  ifNoneMatch
10205
10283
  ],
10206
- serializer: serializer$2
10284
+ serializer: serializer$3
10207
10285
  };
10208
- const getOperationSpec$1 = {
10286
+ const getOperationSpec$2 = {
10209
10287
  path: "/synonymmaps('{synonymMapName}')",
10210
10288
  httpMethod: "GET",
10211
10289
  responses: {
@@ -10219,9 +10297,9 @@ const getOperationSpec$1 = {
10219
10297
  queryParameters: [apiVersion],
10220
10298
  urlParameters: [endpoint, synonymMapName],
10221
10299
  headerParameters: [accept, xMsClientRequestId],
10222
- serializer: serializer$2
10300
+ serializer: serializer$3
10223
10301
  };
10224
- const listOperationSpec$1 = {
10302
+ const listOperationSpec$2 = {
10225
10303
  path: "/synonymmaps",
10226
10304
  httpMethod: "GET",
10227
10305
  responses: {
@@ -10235,9 +10313,9 @@ const listOperationSpec$1 = {
10235
10313
  queryParameters: [apiVersion, select],
10236
10314
  urlParameters: [endpoint],
10237
10315
  headerParameters: [accept, xMsClientRequestId],
10238
- serializer: serializer$2
10316
+ serializer: serializer$3
10239
10317
  };
10240
- const createOperationSpec$1 = {
10318
+ const createOperationSpec$2 = {
10241
10319
  path: "/synonymmaps",
10242
10320
  httpMethod: "POST",
10243
10321
  responses: {
@@ -10257,7 +10335,7 @@ const createOperationSpec$1 = {
10257
10335
  xMsClientRequestId
10258
10336
  ],
10259
10337
  mediaType: "json",
10260
- serializer: serializer$2
10338
+ serializer: serializer$3
10261
10339
  };
10262
10340
 
10263
10341
  /*
@@ -10282,14 +10360,14 @@ class IndexesImpl {
10282
10360
  * @param options The options parameters.
10283
10361
  */
10284
10362
  create(index, options) {
10285
- return this.client.sendOperationRequest({ index, options }, createOperationSpec);
10363
+ return this.client.sendOperationRequest({ index, options }, createOperationSpec$1);
10286
10364
  }
10287
10365
  /**
10288
10366
  * Lists all indexes available for a search service.
10289
10367
  * @param options The options parameters.
10290
10368
  */
10291
10369
  list(options) {
10292
- return this.client.sendOperationRequest({ options }, listOperationSpec);
10370
+ return this.client.sendOperationRequest({ options }, listOperationSpec$1);
10293
10371
  }
10294
10372
  /**
10295
10373
  * Creates a new search index or updates an index if it already exists.
@@ -10298,7 +10376,7 @@ class IndexesImpl {
10298
10376
  * @param options The options parameters.
10299
10377
  */
10300
10378
  createOrUpdate(indexName, index, options) {
10301
- return this.client.sendOperationRequest({ indexName, index, options }, createOrUpdateOperationSpec);
10379
+ return this.client.sendOperationRequest({ indexName, index, options }, createOrUpdateOperationSpec$1);
10302
10380
  }
10303
10381
  /**
10304
10382
  * Deletes a search index and all the documents it contains. This operation is permanent, with no
@@ -10308,7 +10386,7 @@ class IndexesImpl {
10308
10386
  * @param options The options parameters.
10309
10387
  */
10310
10388
  delete(indexName, options) {
10311
- return this.client.sendOperationRequest({ indexName, options }, deleteOperationSpec);
10389
+ return this.client.sendOperationRequest({ indexName, options }, deleteOperationSpec$1);
10312
10390
  }
10313
10391
  /**
10314
10392
  * Retrieves an index definition.
@@ -10316,7 +10394,7 @@ class IndexesImpl {
10316
10394
  * @param options The options parameters.
10317
10395
  */
10318
10396
  get(indexName, options) {
10319
- return this.client.sendOperationRequest({ indexName, options }, getOperationSpec);
10397
+ return this.client.sendOperationRequest({ indexName, options }, getOperationSpec$1);
10320
10398
  }
10321
10399
  /**
10322
10400
  * Returns statistics for the given index, including a document count and storage usage.
@@ -10337,8 +10415,8 @@ class IndexesImpl {
10337
10415
  }
10338
10416
  }
10339
10417
  // Operation Specifications
10340
- const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10341
- const createOperationSpec = {
10418
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10419
+ const createOperationSpec$1 = {
10342
10420
  path: "/indexes",
10343
10421
  httpMethod: "POST",
10344
10422
  responses: {
@@ -10358,9 +10436,9 @@ const createOperationSpec = {
10358
10436
  xMsClientRequestId
10359
10437
  ],
10360
10438
  mediaType: "json",
10361
- serializer: serializer$1
10439
+ serializer: serializer$2
10362
10440
  };
10363
- const listOperationSpec = {
10441
+ const listOperationSpec$1 = {
10364
10442
  path: "/indexes",
10365
10443
  httpMethod: "GET",
10366
10444
  responses: {
@@ -10374,9 +10452,9 @@ const listOperationSpec = {
10374
10452
  queryParameters: [apiVersion, select],
10375
10453
  urlParameters: [endpoint],
10376
10454
  headerParameters: [accept, xMsClientRequestId],
10377
- serializer: serializer$1
10455
+ serializer: serializer$2
10378
10456
  };
10379
- const createOrUpdateOperationSpec = {
10457
+ const createOrUpdateOperationSpec$1 = {
10380
10458
  path: "/indexes('{indexName}')",
10381
10459
  httpMethod: "PUT",
10382
10460
  responses: {
@@ -10402,9 +10480,9 @@ const createOrUpdateOperationSpec = {
10402
10480
  prefer
10403
10481
  ],
10404
10482
  mediaType: "json",
10405
- serializer: serializer$1
10483
+ serializer: serializer$2
10406
10484
  };
10407
- const deleteOperationSpec = {
10485
+ const deleteOperationSpec$1 = {
10408
10486
  path: "/indexes('{indexName}')",
10409
10487
  httpMethod: "DELETE",
10410
10488
  responses: {
@@ -10422,9 +10500,9 @@ const deleteOperationSpec = {
10422
10500
  ifMatch,
10423
10501
  ifNoneMatch
10424
10502
  ],
10425
- serializer: serializer$1
10503
+ serializer: serializer$2
10426
10504
  };
10427
- const getOperationSpec = {
10505
+ const getOperationSpec$1 = {
10428
10506
  path: "/indexes('{indexName}')",
10429
10507
  httpMethod: "GET",
10430
10508
  responses: {
@@ -10438,7 +10516,7 @@ const getOperationSpec = {
10438
10516
  queryParameters: [apiVersion],
10439
10517
  urlParameters: [endpoint, indexName],
10440
10518
  headerParameters: [accept, xMsClientRequestId],
10441
- serializer: serializer$1
10519
+ serializer: serializer$2
10442
10520
  };
10443
10521
  const getStatisticsOperationSpec = {
10444
10522
  path: "/indexes('{indexName}')/search.stats",
@@ -10454,7 +10532,7 @@ const getStatisticsOperationSpec = {
10454
10532
  queryParameters: [apiVersion],
10455
10533
  urlParameters: [endpoint, indexName],
10456
10534
  headerParameters: [accept, xMsClientRequestId],
10457
- serializer: serializer$1
10535
+ serializer: serializer$2
10458
10536
  };
10459
10537
  const analyzeOperationSpec = {
10460
10538
  path: "/indexes('{indexName}')/search.analyze",
@@ -10476,6 +10554,169 @@ const analyzeOperationSpec = {
10476
10554
  xMsClientRequestId
10477
10555
  ],
10478
10556
  mediaType: "json",
10557
+ serializer: serializer$2
10558
+ };
10559
+
10560
+ /*
10561
+ * Copyright (c) Microsoft Corporation.
10562
+ * Licensed under the MIT License.
10563
+ *
10564
+ * Code generated by Microsoft (R) AutoRest Code Generator.
10565
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
10566
+ */
10567
+ /** Class containing Aliases operations. */
10568
+ class AliasesImpl {
10569
+ /**
10570
+ * Initialize a new instance of the class Aliases class.
10571
+ * @param client Reference to the service client
10572
+ */
10573
+ constructor(client) {
10574
+ this.client = client;
10575
+ }
10576
+ /**
10577
+ * Creates a new search alias.
10578
+ * @param alias The definition of the alias to create.
10579
+ * @param options The options parameters.
10580
+ */
10581
+ create(alias, options) {
10582
+ return this.client.sendOperationRequest({ alias, options }, createOperationSpec);
10583
+ }
10584
+ /**
10585
+ * Lists all aliases available for a search service.
10586
+ * @param options The options parameters.
10587
+ */
10588
+ list(options) {
10589
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
10590
+ }
10591
+ /**
10592
+ * Creates a new search alias or updates an alias if it already exists.
10593
+ * @param aliasName The definition of the alias to create or update.
10594
+ * @param alias The definition of the alias to create or update.
10595
+ * @param options The options parameters.
10596
+ */
10597
+ createOrUpdate(aliasName, alias, options) {
10598
+ return this.client.sendOperationRequest({ aliasName, alias, options }, createOrUpdateOperationSpec);
10599
+ }
10600
+ /**
10601
+ * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no
10602
+ * recovery option. The mapped index is untouched by this operation.
10603
+ * @param aliasName The name of the alias to delete.
10604
+ * @param options The options parameters.
10605
+ */
10606
+ delete(aliasName, options) {
10607
+ return this.client.sendOperationRequest({ aliasName, options }, deleteOperationSpec);
10608
+ }
10609
+ /**
10610
+ * Retrieves an alias definition.
10611
+ * @param aliasName The name of the alias to retrieve.
10612
+ * @param options The options parameters.
10613
+ */
10614
+ get(aliasName, options) {
10615
+ return this.client.sendOperationRequest({ aliasName, options }, getOperationSpec);
10616
+ }
10617
+ }
10618
+ // Operation Specifications
10619
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10620
+ const createOperationSpec = {
10621
+ path: "/aliases",
10622
+ httpMethod: "POST",
10623
+ responses: {
10624
+ 201: {
10625
+ bodyMapper: SearchAlias
10626
+ },
10627
+ default: {
10628
+ bodyMapper: SearchError
10629
+ }
10630
+ },
10631
+ requestBody: alias,
10632
+ queryParameters: [apiVersion],
10633
+ urlParameters: [endpoint],
10634
+ headerParameters: [
10635
+ contentType,
10636
+ accept,
10637
+ xMsClientRequestId
10638
+ ],
10639
+ mediaType: "json",
10640
+ serializer: serializer$1
10641
+ };
10642
+ const listOperationSpec = {
10643
+ path: "/aliases",
10644
+ httpMethod: "GET",
10645
+ responses: {
10646
+ 200: {
10647
+ bodyMapper: ListAliasesResult
10648
+ },
10649
+ default: {
10650
+ bodyMapper: SearchError
10651
+ }
10652
+ },
10653
+ queryParameters: [apiVersion],
10654
+ urlParameters: [endpoint],
10655
+ headerParameters: [accept, xMsClientRequestId],
10656
+ serializer: serializer$1
10657
+ };
10658
+ const createOrUpdateOperationSpec = {
10659
+ path: "/aliases('{aliasName}')",
10660
+ httpMethod: "PUT",
10661
+ responses: {
10662
+ 200: {
10663
+ bodyMapper: SearchAlias
10664
+ },
10665
+ 201: {
10666
+ bodyMapper: SearchAlias
10667
+ },
10668
+ default: {
10669
+ bodyMapper: SearchError
10670
+ }
10671
+ },
10672
+ requestBody: alias,
10673
+ queryParameters: [apiVersion],
10674
+ urlParameters: [endpoint, aliasName],
10675
+ headerParameters: [
10676
+ contentType,
10677
+ accept,
10678
+ xMsClientRequestId,
10679
+ ifMatch,
10680
+ ifNoneMatch,
10681
+ prefer
10682
+ ],
10683
+ mediaType: "json",
10684
+ serializer: serializer$1
10685
+ };
10686
+ const deleteOperationSpec = {
10687
+ path: "/aliases('{aliasName}')",
10688
+ httpMethod: "DELETE",
10689
+ responses: {
10690
+ 204: {},
10691
+ 404: {},
10692
+ default: {
10693
+ bodyMapper: SearchError
10694
+ }
10695
+ },
10696
+ queryParameters: [apiVersion],
10697
+ urlParameters: [endpoint, aliasName],
10698
+ headerParameters: [
10699
+ accept,
10700
+ xMsClientRequestId,
10701
+ ifMatch,
10702
+ ifNoneMatch
10703
+ ],
10704
+ serializer: serializer$1
10705
+ };
10706
+ const getOperationSpec = {
10707
+ path: "/aliases('{aliasName}')",
10708
+ httpMethod: "GET",
10709
+ responses: {
10710
+ 200: {
10711
+ bodyMapper: SearchAlias
10712
+ },
10713
+ default: {
10714
+ bodyMapper: SearchError
10715
+ }
10716
+ },
10717
+ queryParameters: [apiVersion],
10718
+ urlParameters: [endpoint, aliasName],
10719
+ headerParameters: [accept, xMsClientRequestId],
10479
10720
  serializer: serializer$1
10480
10721
  };
10481
10722
 
@@ -10508,7 +10749,7 @@ class SearchServiceClientContext extends coreClient__namespace.ServiceClient {
10508
10749
  const defaults = {
10509
10750
  requestContentType: "application/json; charset=utf-8"
10510
10751
  };
10511
- const packageDetails = `azsdk-js-search-documents/11.3.0-beta.6`;
10752
+ const packageDetails = `azsdk-js-search-documents/11.3.0-beta.7`;
10512
10753
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
10513
10754
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
10514
10755
  : `${packageDetails}`;
@@ -10544,6 +10785,7 @@ class SearchServiceClient extends SearchServiceClientContext {
10544
10785
  this.skillsets = new SkillsetsImpl(this);
10545
10786
  this.synonymMaps = new SynonymMapsImpl(this);
10546
10787
  this.indexes = new IndexesImpl(this);
10788
+ this.aliases = new AliasesImpl(this);
10547
10789
  }
10548
10790
  /**
10549
10791
  * Gets service level statistics for a search service.
@@ -10710,6 +10952,61 @@ class SearchIndexClient {
10710
10952
  },
10711
10953
  };
10712
10954
  }
10955
+ listAliasesPage(options = {}) {
10956
+ return tslib.__asyncGenerator(this, arguments, function* listAliasesPage_1() {
10957
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-listAliases", options);
10958
+ try {
10959
+ const result = yield tslib.__await(this.client.aliases.list(updatedOptions));
10960
+ yield yield tslib.__await(result.aliases);
10961
+ }
10962
+ catch (e) {
10963
+ span.setStatus({
10964
+ code: coreTracing.SpanStatusCode.ERROR,
10965
+ message: e.message,
10966
+ });
10967
+ throw e;
10968
+ }
10969
+ finally {
10970
+ span.end();
10971
+ }
10972
+ });
10973
+ }
10974
+ listAliasesAll(options = {}) {
10975
+ return tslib.__asyncGenerator(this, arguments, function* listAliasesAll_1() {
10976
+ var e_2, _a;
10977
+ try {
10978
+ for (var _b = tslib.__asyncValues(this.listAliasesPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
10979
+ const page = _c.value;
10980
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
10981
+ }
10982
+ }
10983
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
10984
+ finally {
10985
+ try {
10986
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
10987
+ }
10988
+ finally { if (e_2) throw e_2.error; }
10989
+ }
10990
+ });
10991
+ }
10992
+ /**
10993
+ * Lists all aliases available for a search service.
10994
+ * @param options - The options parameters.
10995
+ */
10996
+ listAliases(options = {}) {
10997
+ const iter = this.listAliasesAll(options);
10998
+ return {
10999
+ next() {
11000
+ return iter.next();
11001
+ },
11002
+ [Symbol.asyncIterator]() {
11003
+ return this;
11004
+ },
11005
+ byPage: () => {
11006
+ return this.listAliasesPage(options);
11007
+ },
11008
+ };
11009
+ }
10713
11010
  listIndexesNamesPage(options = {}) {
10714
11011
  return tslib.__asyncGenerator(this, arguments, function* listIndexesNamesPage_1() {
10715
11012
  const { span, updatedOptions } = createSpan("SearchIndexClient-listIndexesNamesPage", options);
@@ -10732,19 +11029,19 @@ class SearchIndexClient {
10732
11029
  }
10733
11030
  listIndexesNamesAll(options = {}) {
10734
11031
  return tslib.__asyncGenerator(this, arguments, function* listIndexesNamesAll_1() {
10735
- var e_2, _a;
11032
+ var e_3, _a;
10736
11033
  try {
10737
11034
  for (var _b = tslib.__asyncValues(this.listIndexesNamesPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
10738
11035
  const page = _c.value;
10739
11036
  yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
10740
11037
  }
10741
11038
  }
10742
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
11039
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
10743
11040
  finally {
10744
11041
  try {
10745
11042
  if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
10746
11043
  }
10747
- finally { if (e_2) throw e_2.error; }
11044
+ finally { if (e_3) throw e_3.error; }
10748
11045
  }
10749
11046
  });
10750
11047
  }
@@ -10992,6 +11289,97 @@ class SearchIndexClient {
10992
11289
  span.end();
10993
11290
  }
10994
11291
  }
11292
+ /**
11293
+ * Creates a new search alias or updates an alias if it already exists.
11294
+ * @param alias - The definition of the alias to create or update.
11295
+ * @param options - The options parameters.
11296
+ */
11297
+ async createOrUpdateAlias(alias, options = {}) {
11298
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-createOrUpdateAlias", options);
11299
+ try {
11300
+ const etag = options.onlyIfUnchanged ? alias.etag : undefined;
11301
+ const result = await this.client.aliases.createOrUpdate(alias.name, alias, Object.assign(Object.assign({}, updatedOptions), { ifMatch: etag }));
11302
+ return result;
11303
+ }
11304
+ catch (e) {
11305
+ span.setStatus({
11306
+ code: coreTracing.SpanStatusCode.ERROR,
11307
+ message: e.message,
11308
+ });
11309
+ throw e;
11310
+ }
11311
+ finally {
11312
+ span.end();
11313
+ }
11314
+ }
11315
+ /**
11316
+ * Creates a new search alias.
11317
+ * @param alias - The definition of the alias to create.
11318
+ * @param options - The options parameters.
11319
+ */
11320
+ async createAlias(alias, options = {}) {
11321
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-createAlias", options);
11322
+ try {
11323
+ const result = await this.client.aliases.create(alias, updatedOptions);
11324
+ return result;
11325
+ }
11326
+ catch (e) {
11327
+ span.setStatus({
11328
+ code: coreTracing.SpanStatusCode.ERROR,
11329
+ message: e.message,
11330
+ });
11331
+ throw e;
11332
+ }
11333
+ finally {
11334
+ span.end();
11335
+ }
11336
+ }
11337
+ /**
11338
+ * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no
11339
+ * recovery option. The mapped index is untouched by this operation.
11340
+ * @param alias - Alias/Name name of the alias to delete.
11341
+ * @param options - The options parameters.
11342
+ */
11343
+ async deleteAlias(alias, options = {}) {
11344
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-deleteAlias", options);
11345
+ try {
11346
+ const aliasName = typeof alias === "string" ? alias : alias.name;
11347
+ const etag = typeof alias === "string" ? undefined : options.onlyIfUnchanged ? alias.etag : undefined;
11348
+ await this.client.aliases.delete(aliasName, Object.assign(Object.assign({}, updatedOptions), { ifMatch: etag }));
11349
+ }
11350
+ catch (e) {
11351
+ span.setStatus({
11352
+ code: coreTracing.SpanStatusCode.ERROR,
11353
+ message: e.message,
11354
+ });
11355
+ throw e;
11356
+ }
11357
+ finally {
11358
+ span.end();
11359
+ }
11360
+ }
11361
+ /**
11362
+ * Retrieves an alias definition.
11363
+ * @param aliasName - The name of the alias to retrieve.
11364
+ * @param options - The options parameters.
11365
+ */
11366
+ async getAlias(aliasName, options = {}) {
11367
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-getAlias", options);
11368
+ try {
11369
+ const result = await this.client.aliases.get(aliasName, updatedOptions);
11370
+ return result;
11371
+ }
11372
+ catch (e) {
11373
+ span.setStatus({
11374
+ code: coreTracing.SpanStatusCode.ERROR,
11375
+ message: e.message,
11376
+ });
11377
+ throw e;
11378
+ }
11379
+ finally {
11380
+ span.end();
11381
+ }
11382
+ }
10995
11383
  /**
10996
11384
  * Retrieves statistics about an index, such as the count of documents and the size
10997
11385
  * of index storage.