@azure/search-documents 11.3.0-beta.5 → 11.3.0-beta.8

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 (72) hide show
  1. package/README.md +71 -55
  2. package/dist/index.js +1178 -601
  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/index.js +0 -1
  7. package/dist-esm/src/generated/data/index.js.map +1 -1
  8. package/dist-esm/src/generated/data/models/index.js +2 -2
  9. package/dist-esm/src/generated/data/models/index.js.map +1 -1
  10. package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
  11. package/dist-esm/src/generated/data/searchClient.js +31 -3
  12. package/dist-esm/src/generated/data/searchClient.js.map +1 -1
  13. package/dist-esm/src/generated/data/searchClientContext.js +1 -1
  14. package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
  15. package/dist-esm/src/generated/service/index.js +0 -1
  16. package/dist-esm/src/generated/service/index.js.map +1 -1
  17. package/dist-esm/src/generated/service/models/index.js +2 -0
  18. package/dist-esm/src/generated/service/models/index.js.map +1 -1
  19. package/dist-esm/src/generated/service/models/mappers.js +109 -0
  20. package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
  21. package/dist-esm/src/generated/service/models/parameters.js +15 -1
  22. package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
  23. package/dist-esm/src/generated/service/operations/aliases.js +166 -0
  24. package/dist-esm/src/generated/service/operations/aliases.js.map +1 -0
  25. package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
  26. package/dist-esm/src/generated/service/operations/index.js +1 -0
  27. package/dist-esm/src/generated/service/operations/index.js.map +1 -1
  28. package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
  29. package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
  30. package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
  31. package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
  32. package/dist-esm/src/generated/service/operationsInterfaces/aliases.js +9 -0
  33. package/dist-esm/src/generated/service/operationsInterfaces/aliases.js.map +1 -0
  34. package/dist-esm/src/generated/service/operationsInterfaces/index.js +1 -0
  35. package/dist-esm/src/generated/service/operationsInterfaces/index.js.map +1 -1
  36. package/dist-esm/src/generated/service/searchServiceClient.js +29 -4
  37. package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
  38. package/dist-esm/src/generated/service/searchServiceClientContext.js +1 -1
  39. package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
  40. package/dist-esm/src/geographyPoint.js +1 -1
  41. package/dist-esm/src/geographyPoint.js.map +1 -1
  42. package/dist-esm/src/index.js +5 -4
  43. package/dist-esm/src/index.js.map +1 -1
  44. package/dist-esm/src/indexDocumentsBatch.js +1 -1
  45. package/dist-esm/src/indexDocumentsBatch.js.map +1 -1
  46. package/dist-esm/src/indexModels.js.map +1 -1
  47. package/dist-esm/src/odataMetadataPolicy.js +1 -1
  48. package/dist-esm/src/odataMetadataPolicy.js.map +1 -1
  49. package/dist-esm/src/searchApiKeyCredentialPolicy.js +1 -1
  50. package/dist-esm/src/searchApiKeyCredentialPolicy.js.map +1 -1
  51. package/dist-esm/src/searchAudience.js +21 -0
  52. package/dist-esm/src/searchAudience.js.map +1 -0
  53. package/dist-esm/src/searchClient.js +55 -40
  54. package/dist-esm/src/searchClient.js.map +1 -1
  55. package/dist-esm/src/searchIndexClient.js +206 -45
  56. package/dist-esm/src/searchIndexClient.js.map +1 -1
  57. package/dist-esm/src/searchIndexerClient.js +72 -57
  58. package/dist-esm/src/searchIndexerClient.js.map +1 -1
  59. package/dist-esm/src/searchIndexingBufferedSender.js +15 -16
  60. package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
  61. package/dist-esm/src/serialization.js +5 -5
  62. package/dist-esm/src/serialization.js.map +1 -1
  63. package/dist-esm/src/serviceModels.js.map +1 -1
  64. package/dist-esm/src/serviceUtils.js +23 -19
  65. package/dist-esm/src/serviceUtils.js.map +1 -1
  66. package/dist-esm/src/synonymMapHelper.js +1 -1
  67. package/dist-esm/src/synonymMapHelper.js.map +1 -1
  68. package/dist-esm/src/tracing.js +6 -5
  69. package/dist-esm/src/tracing.js.map +1 -1
  70. package/package.json +22 -33
  71. package/types/search-documents.d.ts +195 -17
  72. package/CHANGELOG.md +0 -188
package/dist/index.js CHANGED
@@ -2,18 +2,42 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
-
7
5
  var tslib = require('tslib');
8
6
  var coreRestPipeline = require('@azure/core-rest-pipeline');
7
+ var coreHttpCompat = require('@azure/core-http-compat');
9
8
  var coreClient = require('@azure/core-client');
10
9
  var coreAuth = require('@azure/core-auth');
11
10
  var logger$1 = require('@azure/logger');
12
11
  var coreTracing = require('@azure/core-tracing');
13
- var EventEmitter = _interopDefault(require('events'));
12
+ var EventEmitter = require('events');
14
13
  var util = require('util');
15
14
  var fs = require('fs');
16
15
 
16
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
+
18
+ function _interopNamespace(e) {
19
+ if (e && e.__esModule) return e;
20
+ var n = Object.create(null);
21
+ if (e) {
22
+ Object.keys(e).forEach(function (k) {
23
+ if (k !== 'default') {
24
+ var d = Object.getOwnPropertyDescriptor(e, k);
25
+ Object.defineProperty(n, k, d.get ? d : {
26
+ enumerable: true,
27
+ get: function () { return e[k]; }
28
+ });
29
+ }
30
+ });
31
+ }
32
+ n["default"] = e;
33
+ return Object.freeze(n);
34
+ }
35
+
36
+ var coreHttpCompat__namespace = /*#__PURE__*/_interopNamespace(coreHttpCompat);
37
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
38
+ var EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
39
+ var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
40
+
17
41
  /*
18
42
  * Copyright (c) Microsoft Corporation.
19
43
  * Licensed under the MIT License.
@@ -21,7 +45,7 @@ var fs = require('fs');
21
45
  * Code generated by Microsoft (R) AutoRest Code Generator.
22
46
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
23
47
  */
24
- const SearchError = {
48
+ const SearchError$1 = {
25
49
  type: {
26
50
  name: "Composite",
27
51
  className: "SearchError",
@@ -781,9 +805,9 @@ const AutocompleteRequest = {
781
805
  }
782
806
  };
783
807
 
784
- var Mappers = /*#__PURE__*/Object.freeze({
808
+ var Mappers$1 = /*#__PURE__*/Object.freeze({
785
809
  __proto__: null,
786
- SearchError: SearchError,
810
+ SearchError: SearchError$1,
787
811
  SearchDocumentsResult: SearchDocumentsResult,
788
812
  FacetResult: FacetResult,
789
813
  AnswerResult: AnswerResult,
@@ -809,7 +833,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
809
833
  * Code generated by Microsoft (R) AutoRest Code Generator.
810
834
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
811
835
  */
812
- const accept = {
836
+ const accept$1 = {
813
837
  parameterPath: "accept",
814
838
  mapper: {
815
839
  defaultValue: "application/json",
@@ -820,7 +844,7 @@ const accept = {
820
844
  }
821
845
  }
822
846
  };
823
- const endpoint = {
847
+ const endpoint$1 = {
824
848
  parameterPath: "endpoint",
825
849
  mapper: {
826
850
  serializedName: "endpoint",
@@ -831,7 +855,7 @@ const endpoint = {
831
855
  },
832
856
  skipEncoding: true
833
857
  };
834
- const indexName = {
858
+ const indexName$1 = {
835
859
  parameterPath: "indexName",
836
860
  mapper: {
837
861
  serializedName: "indexName",
@@ -841,7 +865,7 @@ const indexName = {
841
865
  }
842
866
  }
843
867
  };
844
- const xMsClientRequestId = {
868
+ const xMsClientRequestId$1 = {
845
869
  parameterPath: ["options", "requestOptionsParam", "xMsClientRequestId"],
846
870
  mapper: {
847
871
  serializedName: "x-ms-client-request-id",
@@ -850,7 +874,7 @@ const xMsClientRequestId = {
850
874
  }
851
875
  }
852
876
  };
853
- const apiVersion = {
877
+ const apiVersion$1 = {
854
878
  parameterPath: "apiVersion",
855
879
  mapper: {
856
880
  serializedName: "api-version",
@@ -1073,7 +1097,7 @@ const sessionId = {
1073
1097
  }
1074
1098
  }
1075
1099
  };
1076
- const select = {
1100
+ const select$1 = {
1077
1101
  parameterPath: ["options", "searchOptions", "select"],
1078
1102
  mapper: {
1079
1103
  serializedName: "$select",
@@ -1130,7 +1154,7 @@ const semanticFields = {
1130
1154
  },
1131
1155
  collectionFormat: "CSV"
1132
1156
  };
1133
- const contentType = {
1157
+ const contentType$1 = {
1134
1158
  parameterPath: ["options", "contentType"],
1135
1159
  mapper: {
1136
1160
  defaultValue: "application/json",
@@ -1425,7 +1449,7 @@ class DocumentsImpl {
1425
1449
  * @param options The options parameters.
1426
1450
  */
1427
1451
  get(key, options) {
1428
- return this.client.sendOperationRequest({ key, options }, getOperationSpec);
1452
+ return this.client.sendOperationRequest({ key, options }, getOperationSpec$6);
1429
1453
  }
1430
1454
  /**
1431
1455
  * Suggests documents in the index that match the given partial query text.
@@ -1474,7 +1498,7 @@ class DocumentsImpl {
1474
1498
  }
1475
1499
  }
1476
1500
  // Operation Specifications
1477
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
1501
+ const serializer$7 = coreClient__namespace.createSerializer(Mappers$1, /* isXml */ false);
1478
1502
  const countOperationSpec = {
1479
1503
  path: "/docs/$count",
1480
1504
  httpMethod: "GET",
@@ -1483,13 +1507,13 @@ const countOperationSpec = {
1483
1507
  bodyMapper: { type: { name: "Number" } }
1484
1508
  },
1485
1509
  default: {
1486
- bodyMapper: SearchError
1510
+ bodyMapper: SearchError$1
1487
1511
  }
1488
1512
  },
1489
- queryParameters: [apiVersion],
1490
- urlParameters: [endpoint, indexName],
1491
- headerParameters: [accept, xMsClientRequestId],
1492
- serializer
1513
+ queryParameters: [apiVersion$1],
1514
+ urlParameters: [endpoint$1, indexName$1],
1515
+ headerParameters: [accept$1, xMsClientRequestId$1],
1516
+ serializer: serializer$7
1493
1517
  };
1494
1518
  const searchGetOperationSpec = {
1495
1519
  path: "/docs",
@@ -1499,11 +1523,11 @@ const searchGetOperationSpec = {
1499
1523
  bodyMapper: SearchDocumentsResult
1500
1524
  },
1501
1525
  default: {
1502
- bodyMapper: SearchError
1526
+ bodyMapper: SearchError$1
1503
1527
  }
1504
1528
  },
1505
1529
  queryParameters: [
1506
- apiVersion,
1530
+ apiVersion$1,
1507
1531
  searchText,
1508
1532
  includeTotalResultCount,
1509
1533
  facets,
@@ -1524,15 +1548,15 @@ const searchGetOperationSpec = {
1524
1548
  searchMode,
1525
1549
  scoringStatistics,
1526
1550
  sessionId,
1527
- select,
1551
+ select$1,
1528
1552
  skip,
1529
1553
  top,
1530
1554
  captions,
1531
1555
  semanticFields
1532
1556
  ],
1533
- urlParameters: [endpoint, indexName],
1534
- headerParameters: [accept, xMsClientRequestId],
1535
- serializer
1557
+ urlParameters: [endpoint$1, indexName$1],
1558
+ headerParameters: [accept$1, xMsClientRequestId$1],
1559
+ serializer: serializer$7
1536
1560
  };
1537
1561
  const searchPostOperationSpec = {
1538
1562
  path: "/docs/search.post.search",
@@ -1542,21 +1566,21 @@ const searchPostOperationSpec = {
1542
1566
  bodyMapper: SearchDocumentsResult
1543
1567
  },
1544
1568
  default: {
1545
- bodyMapper: SearchError
1569
+ bodyMapper: SearchError$1
1546
1570
  }
1547
1571
  },
1548
1572
  requestBody: searchRequest,
1549
- queryParameters: [apiVersion],
1550
- urlParameters: [endpoint, indexName],
1573
+ queryParameters: [apiVersion$1],
1574
+ urlParameters: [endpoint$1, indexName$1],
1551
1575
  headerParameters: [
1552
- accept,
1553
- xMsClientRequestId,
1554
- contentType
1576
+ accept$1,
1577
+ xMsClientRequestId$1,
1578
+ contentType$1
1555
1579
  ],
1556
1580
  mediaType: "json",
1557
- serializer
1581
+ serializer: serializer$7
1558
1582
  };
1559
- const getOperationSpec = {
1583
+ const getOperationSpec$6 = {
1560
1584
  path: "/docs('{key}')",
1561
1585
  httpMethod: "GET",
1562
1586
  responses: {
@@ -1566,13 +1590,13 @@ const getOperationSpec = {
1566
1590
  }
1567
1591
  },
1568
1592
  default: {
1569
- bodyMapper: SearchError
1593
+ bodyMapper: SearchError$1
1570
1594
  }
1571
1595
  },
1572
- queryParameters: [apiVersion, selectedFields],
1573
- urlParameters: [endpoint, indexName, key],
1574
- headerParameters: [accept, xMsClientRequestId],
1575
- serializer
1596
+ queryParameters: [apiVersion$1, selectedFields],
1597
+ urlParameters: [endpoint$1, indexName$1, key],
1598
+ headerParameters: [accept$1, xMsClientRequestId$1],
1599
+ serializer: serializer$7
1576
1600
  };
1577
1601
  const suggestGetOperationSpec = {
1578
1602
  path: "/docs/search.suggest",
@@ -1582,11 +1606,11 @@ const suggestGetOperationSpec = {
1582
1606
  bodyMapper: SuggestDocumentsResult
1583
1607
  },
1584
1608
  default: {
1585
- bodyMapper: SearchError
1609
+ bodyMapper: SearchError$1
1586
1610
  }
1587
1611
  },
1588
1612
  queryParameters: [
1589
- apiVersion,
1613
+ apiVersion$1,
1590
1614
  searchText1,
1591
1615
  suggesterName,
1592
1616
  filter1,
@@ -1599,9 +1623,9 @@ const suggestGetOperationSpec = {
1599
1623
  select1,
1600
1624
  top1
1601
1625
  ],
1602
- urlParameters: [endpoint, indexName],
1603
- headerParameters: [accept, xMsClientRequestId],
1604
- serializer
1626
+ urlParameters: [endpoint$1, indexName$1],
1627
+ headerParameters: [accept$1, xMsClientRequestId$1],
1628
+ serializer: serializer$7
1605
1629
  };
1606
1630
  const suggestPostOperationSpec = {
1607
1631
  path: "/docs/search.post.suggest",
@@ -1611,19 +1635,19 @@ const suggestPostOperationSpec = {
1611
1635
  bodyMapper: SuggestDocumentsResult
1612
1636
  },
1613
1637
  default: {
1614
- bodyMapper: SearchError
1638
+ bodyMapper: SearchError$1
1615
1639
  }
1616
1640
  },
1617
1641
  requestBody: suggestRequest,
1618
- queryParameters: [apiVersion],
1619
- urlParameters: [endpoint, indexName],
1642
+ queryParameters: [apiVersion$1],
1643
+ urlParameters: [endpoint$1, indexName$1],
1620
1644
  headerParameters: [
1621
- accept,
1622
- xMsClientRequestId,
1623
- contentType
1645
+ accept$1,
1646
+ xMsClientRequestId$1,
1647
+ contentType$1
1624
1648
  ],
1625
1649
  mediaType: "json",
1626
- serializer
1650
+ serializer: serializer$7
1627
1651
  };
1628
1652
  const indexOperationSpec = {
1629
1653
  path: "/docs/search.index",
@@ -1636,19 +1660,19 @@ const indexOperationSpec = {
1636
1660
  bodyMapper: IndexDocumentsResult
1637
1661
  },
1638
1662
  default: {
1639
- bodyMapper: SearchError
1663
+ bodyMapper: SearchError$1
1640
1664
  }
1641
1665
  },
1642
1666
  requestBody: batch,
1643
- queryParameters: [apiVersion],
1644
- urlParameters: [endpoint, indexName],
1667
+ queryParameters: [apiVersion$1],
1668
+ urlParameters: [endpoint$1, indexName$1],
1645
1669
  headerParameters: [
1646
- accept,
1647
- xMsClientRequestId,
1648
- contentType
1670
+ accept$1,
1671
+ xMsClientRequestId$1,
1672
+ contentType$1
1649
1673
  ],
1650
1674
  mediaType: "json",
1651
- serializer
1675
+ serializer: serializer$7
1652
1676
  };
1653
1677
  const autocompleteGetOperationSpec = {
1654
1678
  path: "/docs/search.autocomplete",
@@ -1658,11 +1682,11 @@ const autocompleteGetOperationSpec = {
1658
1682
  bodyMapper: AutocompleteResult
1659
1683
  },
1660
1684
  default: {
1661
- bodyMapper: SearchError
1685
+ bodyMapper: SearchError$1
1662
1686
  }
1663
1687
  },
1664
1688
  queryParameters: [
1665
- apiVersion,
1689
+ apiVersion$1,
1666
1690
  searchText1,
1667
1691
  suggesterName,
1668
1692
  autocompleteMode,
@@ -1674,9 +1698,9 @@ const autocompleteGetOperationSpec = {
1674
1698
  searchFields2,
1675
1699
  top2
1676
1700
  ],
1677
- urlParameters: [endpoint, indexName],
1678
- headerParameters: [accept, xMsClientRequestId],
1679
- serializer
1701
+ urlParameters: [endpoint$1, indexName$1],
1702
+ headerParameters: [accept$1, xMsClientRequestId$1],
1703
+ serializer: serializer$7
1680
1704
  };
1681
1705
  const autocompletePostOperationSpec = {
1682
1706
  path: "/docs/search.post.autocomplete",
@@ -1686,19 +1710,19 @@ const autocompletePostOperationSpec = {
1686
1710
  bodyMapper: AutocompleteResult
1687
1711
  },
1688
1712
  default: {
1689
- bodyMapper: SearchError
1713
+ bodyMapper: SearchError$1
1690
1714
  }
1691
1715
  },
1692
1716
  requestBody: autocompleteRequest,
1693
- queryParameters: [apiVersion],
1694
- urlParameters: [endpoint, indexName],
1717
+ queryParameters: [apiVersion$1],
1718
+ urlParameters: [endpoint$1, indexName$1],
1695
1719
  headerParameters: [
1696
- accept,
1697
- xMsClientRequestId,
1698
- contentType
1720
+ accept$1,
1721
+ xMsClientRequestId$1,
1722
+ contentType$1
1699
1723
  ],
1700
1724
  mediaType: "json",
1701
- serializer
1725
+ serializer: serializer$7
1702
1726
  };
1703
1727
 
1704
1728
  /*
@@ -1709,15 +1733,16 @@ const autocompletePostOperationSpec = {
1709
1733
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1710
1734
  */
1711
1735
  /** @internal */
1712
- class SearchClientContext extends coreClient.ServiceClient {
1736
+ class SearchClient$1 extends coreHttpCompat__namespace.ExtendedServiceClient {
1713
1737
  /**
1714
- * Initializes a new instance of the SearchClientContext class.
1738
+ * Initializes a new instance of the SearchClient class.
1715
1739
  * @param endpoint The endpoint URL of the search service.
1716
1740
  * @param indexName The name of the index.
1717
1741
  * @param apiVersion Api Version
1718
1742
  * @param options The parameter options
1719
1743
  */
1720
1744
  constructor(endpoint, indexName, apiVersion, options) {
1745
+ var _a, _b;
1721
1746
  if (endpoint === undefined) {
1722
1747
  throw new Error("'endpoint' cannot be null");
1723
1748
  }
@@ -1734,39 +1759,18 @@ class SearchClientContext extends coreClient.ServiceClient {
1734
1759
  const defaults = {
1735
1760
  requestContentType: "application/json; charset=utf-8"
1736
1761
  };
1737
- const packageDetails = `azsdk-js-search-documents/11.3.0-beta.5`;
1762
+ const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;
1738
1763
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1739
1764
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1740
1765
  : `${packageDetails}`;
1741
1766
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1742
1767
  userAgentPrefix
1743
- }, baseUri: options.endpoint || "{endpoint}/indexes('{indexName}')" });
1768
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}/indexes('{indexName}')" });
1744
1769
  super(optionsWithDefaults);
1745
1770
  // Parameter assignments
1746
1771
  this.endpoint = endpoint;
1747
1772
  this.indexName = indexName;
1748
1773
  this.apiVersion = apiVersion;
1749
- }
1750
- }
1751
-
1752
- /*
1753
- * Copyright (c) Microsoft Corporation.
1754
- * Licensed under the MIT License.
1755
- *
1756
- * Code generated by Microsoft (R) AutoRest Code Generator.
1757
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1758
- */
1759
- /** @internal */
1760
- class SearchClient extends SearchClientContext {
1761
- /**
1762
- * Initializes a new instance of the SearchClient class.
1763
- * @param endpoint The endpoint URL of the search service.
1764
- * @param indexName The name of the index.
1765
- * @param apiVersion Api Version
1766
- * @param options The parameter options
1767
- */
1768
- constructor(endpoint, indexName, apiVersion, options) {
1769
- super(endpoint, indexName, apiVersion, options);
1770
1774
  this.documents = new DocumentsImpl(this);
1771
1775
  }
1772
1776
  }
@@ -1787,13 +1791,13 @@ function createSearchApiKeyCredentialPolicy(credential) {
1787
1791
  request.headers.set(API_KEY_HEADER_NAME, credential.key);
1788
1792
  }
1789
1793
  return next(request);
1790
- }
1794
+ },
1791
1795
  };
1792
1796
  }
1793
1797
 
1794
1798
  // Copyright (c) Microsoft Corporation.
1795
1799
  // Licensed under the MIT license.
1796
- const SDK_VERSION = "11.3.0-beta.5";
1800
+ const SDK_VERSION = "11.3.0-beta.8";
1797
1801
 
1798
1802
  // Copyright (c) Microsoft Corporation.
1799
1803
  /**
@@ -1803,17 +1807,18 @@ const logger = logger$1.createClientLogger("search");
1803
1807
 
1804
1808
  // Copyright (c) Microsoft Corporation.
1805
1809
  /**
1806
- * Creates a span using the global tracer.
1810
+ * Creates a tracing client using the global tracer.
1807
1811
  * @internal
1808
1812
  */
1809
- const createSpan = coreTracing.createSpanFunction({
1810
- packagePrefix: "Azure.Search",
1811
- namespace: "Microsoft.Search"
1813
+ const tracingClient = coreTracing.createTracingClient({
1814
+ namespace: "Microsoft.Search",
1815
+ packageName: "Azure.Search",
1812
1816
  });
1817
+ const createSpan = tracingClient.startSpan;
1813
1818
 
1814
1819
  // Copyright (c) Microsoft Corporation.
1815
1820
  // Licensed under the MIT license.
1816
- const WorldGeodeticSystem1984 = "EPSG:4326"; // See https://epsg.io/4326
1821
+ const WorldGeodeticSystem1984$1 = "EPSG:4326"; // See https://epsg.io/4326
1817
1822
  /**
1818
1823
  * Represents a geographic point in global coordinates.
1819
1824
  */
@@ -1834,7 +1839,7 @@ class GeographyPoint {
1834
1839
  return {
1835
1840
  type: "Point",
1836
1841
  coordinates: [this.longitude, this.latitude],
1837
- crs: { type: "name", properties: { name: WorldGeodeticSystem1984 } }
1842
+ crs: { type: "name", properties: { name: WorldGeodeticSystem1984$1 } },
1838
1843
  };
1839
1844
  }
1840
1845
  }
@@ -1842,7 +1847,7 @@ class GeographyPoint {
1842
1847
  // Copyright (c) Microsoft Corporation.
1843
1848
  const ISO8601DateRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/i;
1844
1849
  const GeoJSONPointTypeName = "Point";
1845
- const WorldGeodeticSystem1984$1 = "EPSG:4326"; // See https://epsg.io/4326
1850
+ const WorldGeodeticSystem1984 = "EPSG:4326"; // See https://epsg.io/4326
1846
1851
  function serialize(obj) {
1847
1852
  return walk(obj, (value) => {
1848
1853
  const result = serializeSpecialNumbers(value);
@@ -1862,7 +1867,7 @@ function walk(start, mapper) {
1862
1867
  const seenMarker = new WeakMap();
1863
1868
  const result = { value: undefined };
1864
1869
  const queue = [
1865
- { value: start, parent: result, key: "value" }
1870
+ { value: start, parent: result, key: "value" },
1866
1871
  ];
1867
1872
  while (queue.length) {
1868
1873
  const current = queue.shift();
@@ -1883,7 +1888,7 @@ function walk(start, mapper) {
1883
1888
  queue.push({
1884
1889
  value: mapped[key],
1885
1890
  parent: mapped,
1886
- key
1891
+ key,
1887
1892
  });
1888
1893
  }
1889
1894
  }
@@ -1947,7 +1952,7 @@ function isGeoJSONPoint(obj) {
1947
1952
  default:
1948
1953
  return false;
1949
1954
  }
1950
- }
1955
+ },
1951
1956
  });
1952
1957
  }
1953
1958
  function isCoordinateArray(maybeCoordinates) {
@@ -1974,7 +1979,7 @@ function isCrs(maybeCrs) {
1974
1979
  default:
1975
1980
  return false;
1976
1981
  }
1977
- }
1982
+ },
1978
1983
  });
1979
1984
  }
1980
1985
  function isCrsProperties(maybeProperties) {
@@ -1982,12 +1987,12 @@ function isCrsProperties(maybeProperties) {
1982
1987
  requiredKeys: ["name"],
1983
1988
  propertyValidator: (key) => {
1984
1989
  if (key === "name") {
1985
- return maybeProperties.name === WorldGeodeticSystem1984$1;
1990
+ return maybeProperties.name === WorldGeodeticSystem1984;
1986
1991
  }
1987
1992
  else {
1988
1993
  return false;
1989
1994
  }
1990
- }
1995
+ },
1991
1996
  });
1992
1997
  }
1993
1998
  function isValidObject(obj, options = {}) {
@@ -2026,7 +2031,7 @@ function createOdataMetadataPolicy(metadataLevel) {
2026
2031
  async sendRequest(request, next) {
2027
2032
  request.headers.set(AcceptHeaderName, `application/json;odata.metadata=${metadataLevel}`);
2028
2033
  return next(request);
2029
- }
2034
+ },
2030
2035
  };
2031
2036
  }
2032
2037
 
@@ -2078,7 +2083,7 @@ class IndexDocumentsBatch {
2078
2083
  const batch = keyValues.map((keyValue) => {
2079
2084
  return {
2080
2085
  __actionType: "delete",
2081
- [keyName]: keyValue
2086
+ [keyName]: keyValue,
2082
2087
  };
2083
2088
  });
2084
2089
  this.actions.push(...batch);
@@ -2115,6 +2120,11 @@ function decode(value) {
2115
2120
  function isComplexField(field) {
2116
2121
  return field.type === "Edm.ComplexType" || field.type === "Collection(Edm.ComplexType)";
2117
2122
  }
2123
+ /**
2124
+ * Defines values for TokenizerName.
2125
+ * @readonly
2126
+ */
2127
+ exports.KnownTokenizerNames = void 0;
2118
2128
  (function (KnownTokenizerNames) {
2119
2129
  /**
2120
2130
  * Grammar-based tokenizer that is suitable for processing most European-language documents. See
@@ -2183,6 +2193,11 @@ function isComplexField(field) {
2183
2193
  */
2184
2194
  KnownTokenizerNames["Whitespace"] = "whitespace";
2185
2195
  })(exports.KnownTokenizerNames || (exports.KnownTokenizerNames = {}));
2196
+ /**
2197
+ * Defines values for TokenFilterName.
2198
+ * @readonly
2199
+ */
2200
+ exports.KnownTokenFilterNames = void 0;
2186
2201
  (function (KnownTokenFilterNames) {
2187
2202
  /**
2188
2203
  * A token filter that applies the Arabic normalizer to normalize the orthography. See
@@ -2361,6 +2376,11 @@ function isComplexField(field) {
2361
2376
  */
2362
2377
  KnownTokenFilterNames["WordDelimiter"] = "word_delimiter";
2363
2378
  })(exports.KnownTokenFilterNames || (exports.KnownTokenFilterNames = {}));
2379
+ /**
2380
+ * Defines values for CharFilterName.
2381
+ * @readonly
2382
+ */
2383
+ exports.KnownCharFilterNames = void 0;
2364
2384
  (function (KnownCharFilterNames) {
2365
2385
  /**
2366
2386
  * A character filter that attempts to strip out HTML constructs. See
@@ -2368,6 +2388,12 @@ function isComplexField(field) {
2368
2388
  */
2369
2389
  KnownCharFilterNames["HtmlStrip"] = "html_strip";
2370
2390
  })(exports.KnownCharFilterNames || (exports.KnownCharFilterNames = {}));
2391
+ /**
2392
+ * Defines values for AnalyzerName.
2393
+ * See https://docs.microsoft.com/rest/api/searchservice/Language-support
2394
+ * @readonly
2395
+ */
2396
+ exports.KnownAnalyzerNames = void 0;
2371
2397
  (function (KnownAnalyzerNames) {
2372
2398
  /**
2373
2399
  * Arabic
@@ -2744,7 +2770,6 @@ function isComplexField(field) {
2744
2770
  // END manually modified generated interfaces
2745
2771
 
2746
2772
  // Copyright (c) Microsoft Corporation.
2747
- const DEFAULT_SEARCH_SCOPE = "https://search.azure.com/.default";
2748
2773
  function convertSkillsToPublic(skills) {
2749
2774
  if (!skills) {
2750
2775
  return skills;
@@ -2806,6 +2831,9 @@ function convertSkillsToPublic(skills) {
2806
2831
  case "#Microsoft.Skills.Util.DocumentExtractionSkill":
2807
2832
  result.push(skill);
2808
2833
  break;
2834
+ case "#Microsoft.Skills.Custom.AmlSkill":
2835
+ result.push(skill);
2836
+ break;
2809
2837
  }
2810
2838
  }
2811
2839
  return result;
@@ -2893,7 +2921,7 @@ function convertFieldsToPublic(fields) {
2893
2921
  return {
2894
2922
  name: field.name,
2895
2923
  type: field.type,
2896
- fields: convertFieldsToPublic(field.fields)
2924
+ fields: convertFieldsToPublic(field.fields),
2897
2925
  };
2898
2926
  }
2899
2927
  else {
@@ -2921,7 +2949,7 @@ function convertFieldsToGenerated(fields) {
2921
2949
  return {
2922
2950
  name: field.name,
2923
2951
  type: field.type,
2924
- fields: convertFieldsToGenerated(field.fields)
2952
+ fields: convertFieldsToGenerated(field.fields),
2925
2953
  };
2926
2954
  }
2927
2955
  else {
@@ -2990,7 +3018,7 @@ function convertEncryptionKeyToPublic(encryptionKey) {
2990
3018
  keyName: encryptionKey.keyName,
2991
3019
  keyVersion: encryptionKey.keyVersion,
2992
3020
  vaultUrl: encryptionKey.vaultUri,
2993
- identity: convertSearchIndexerDataIdentityToPublic(encryptionKey.identity)
3021
+ identity: convertSearchIndexerDataIdentityToPublic(encryptionKey.identity),
2994
3022
  };
2995
3023
  if (encryptionKey.accessCredentials) {
2996
3024
  result.applicationId = encryptionKey.accessCredentials.applicationId;
@@ -3006,12 +3034,12 @@ function convertEncryptionKeyToGenerated(encryptionKey) {
3006
3034
  keyName: encryptionKey.keyName,
3007
3035
  keyVersion: encryptionKey.keyVersion,
3008
3036
  vaultUri: encryptionKey.vaultUrl,
3009
- identity: encryptionKey.identity
3037
+ identity: encryptionKey.identity,
3010
3038
  };
3011
3039
  if (encryptionKey.applicationId) {
3012
3040
  result.accessCredentials = {
3013
3041
  applicationId: encryptionKey.applicationId,
3014
- applicationSecret: encryptionKey.applicationSecret
3042
+ applicationSecret: encryptionKey.applicationSecret,
3015
3043
  };
3016
3044
  }
3017
3045
  return result;
@@ -3032,7 +3060,7 @@ function generatedIndexToPublicIndex(generatedIndex) {
3032
3060
  scoringProfiles: generatedIndex.scoringProfiles,
3033
3061
  fields: convertFieldsToPublic(generatedIndex.fields),
3034
3062
  similarity: convertSimilarityToPublic(generatedIndex.similarity),
3035
- semanticSettings: generatedIndex.semanticSettings
3063
+ semanticSettings: generatedIndex.semanticSettings,
3036
3064
  };
3037
3065
  }
3038
3066
  function generatedSearchResultToPublicSearchResult(results) {
@@ -3044,7 +3072,7 @@ function generatedSearchResultToPublicSearchResult(results) {
3044
3072
  highlights: _highlights,
3045
3073
  rerankerScore,
3046
3074
  captions,
3047
- document: doc
3075
+ document: doc,
3048
3076
  };
3049
3077
  return obj;
3050
3078
  });
@@ -3056,13 +3084,13 @@ function generatedSuggestDocumentsResultToPublicSuggestDocumentsResult(searchDoc
3056
3084
  const doc = Object.assign({}, restProps);
3057
3085
  const obj = {
3058
3086
  text: _text,
3059
- document: doc
3087
+ document: doc,
3060
3088
  };
3061
3089
  return obj;
3062
3090
  });
3063
3091
  const result = {
3064
3092
  results: results,
3065
- coverage: searchDocumentsResult.coverage
3093
+ coverage: searchDocumentsResult.coverage,
3066
3094
  };
3067
3095
  return result;
3068
3096
  }
@@ -3082,7 +3110,7 @@ function publicIndexToGeneratedIndex(index) {
3082
3110
  tokenizers: convertTokenizersToGenerated(index.tokenizers),
3083
3111
  fields: convertFieldsToGenerated(index.fields),
3084
3112
  similarity: convertSimilarityToGenerated(index.similarity),
3085
- semanticSettings: index.semanticSettings
3113
+ semanticSettings: index.semanticSettings,
3086
3114
  };
3087
3115
  }
3088
3116
  function generatedSkillsetToPublicSkillset(generatedSkillset) {
@@ -3093,7 +3121,7 @@ function generatedSkillsetToPublicSkillset(generatedSkillset) {
3093
3121
  cognitiveServicesAccount: convertCognitiveServicesAccountToPublic(generatedSkillset.cognitiveServicesAccount),
3094
3122
  knowledgeStore: generatedSkillset.knowledgeStore,
3095
3123
  etag: generatedSkillset.etag,
3096
- encryptionKey: convertEncryptionKeyToPublic(generatedSkillset.encryptionKey)
3124
+ encryptionKey: convertEncryptionKeyToPublic(generatedSkillset.encryptionKey),
3097
3125
  };
3098
3126
  }
3099
3127
  function publicSkillsetToGeneratedSkillset(skillset) {
@@ -3104,7 +3132,7 @@ function publicSkillsetToGeneratedSkillset(skillset) {
3104
3132
  skills: skillset.skills,
3105
3133
  cognitiveServicesAccount: convertCognitiveServicesAccountToGenerated(skillset.cognitiveServicesAccount),
3106
3134
  knowledgeStore: skillset.knowledgeStore,
3107
- encryptionKey: convertEncryptionKeyToGenerated(skillset.encryptionKey)
3135
+ encryptionKey: convertEncryptionKeyToGenerated(skillset.encryptionKey),
3108
3136
  };
3109
3137
  }
3110
3138
  function generatedSynonymMapToPublicSynonymMap(synonymMap) {
@@ -3112,7 +3140,7 @@ function generatedSynonymMapToPublicSynonymMap(synonymMap) {
3112
3140
  name: synonymMap.name,
3113
3141
  encryptionKey: convertEncryptionKeyToPublic(synonymMap.encryptionKey),
3114
3142
  etag: synonymMap.etag,
3115
- synonyms: []
3143
+ synonyms: [],
3116
3144
  };
3117
3145
  if (synonymMap.synonyms) {
3118
3146
  result.synonyms = synonymMap.synonyms.split("\n");
@@ -3125,7 +3153,7 @@ function publicSynonymMapToGeneratedSynonymMap(synonymMap) {
3125
3153
  format: "solr",
3126
3154
  encryptionKey: convertEncryptionKeyToGenerated(synonymMap.encryptionKey),
3127
3155
  etag: synonymMap.etag,
3128
- synonyms: synonymMap.synonyms.join("\n")
3156
+ synonyms: synonymMap.synonyms.join("\n"),
3129
3157
  };
3130
3158
  result.encryptionKey = convertEncryptionKeyToGenerated(synonymMap.encryptionKey);
3131
3159
  return result;
@@ -3142,14 +3170,14 @@ function publicDataSourceToGeneratedDataSource(dataSource) {
3142
3170
  description: dataSource.description,
3143
3171
  type: dataSource.type,
3144
3172
  credentials: {
3145
- connectionString: dataSource.connectionString
3173
+ connectionString: dataSource.connectionString,
3146
3174
  },
3147
3175
  container: dataSource.container,
3148
3176
  identity: dataSource.identity,
3149
3177
  etag: dataSource.etag,
3150
3178
  dataChangeDetectionPolicy: dataSource.dataChangeDetectionPolicy,
3151
3179
  dataDeletionDetectionPolicy: dataSource.dataDeletionDetectionPolicy,
3152
- encryptionKey: convertEncryptionKeyToGenerated(dataSource.encryptionKey)
3180
+ encryptionKey: convertEncryptionKeyToGenerated(dataSource.encryptionKey),
3153
3181
  };
3154
3182
  }
3155
3183
  function generatedDataSourceToPublicDataSource(dataSource) {
@@ -3163,7 +3191,7 @@ function generatedDataSourceToPublicDataSource(dataSource) {
3163
3191
  etag: dataSource.etag,
3164
3192
  dataChangeDetectionPolicy: convertDataChangeDetectionPolicyToPublic(dataSource.dataChangeDetectionPolicy),
3165
3193
  dataDeletionDetectionPolicy: convertDataDeletionDetectionPolicyToPublic(dataSource.dataDeletionDetectionPolicy),
3166
- encryptionKey: convertEncryptionKeyToPublic(dataSource.encryptionKey)
3194
+ encryptionKey: convertEncryptionKeyToPublic(dataSource.encryptionKey),
3167
3195
  };
3168
3196
  }
3169
3197
  function convertSearchIndexerDataIdentityToPublic(searchIndexerDataIdentity) {
@@ -3213,6 +3241,29 @@ function getRandomIntegerInclusive(min, max) {
3213
3241
  function delay(timeInMs) {
3214
3242
  return new Promise((resolve) => setTimeout(() => resolve(), timeInMs));
3215
3243
  }
3244
+ const serviceVersions = ["2020-06-30", "2021-04-30-Preview"];
3245
+ const defaultServiceVersion = "2021-04-30-Preview";
3246
+
3247
+ // Copyright (c) Microsoft Corporation.
3248
+ // Licensed under the MIT license.
3249
+ /**
3250
+ * Known values for Search Audience
3251
+ */
3252
+ exports.KnownSearchAudience = void 0;
3253
+ (function (KnownSearchAudience) {
3254
+ /**
3255
+ * Audience for Azure China
3256
+ */
3257
+ KnownSearchAudience["AzureChina"] = "https://search.azure.cn";
3258
+ /**
3259
+ * Audience for Azure Government
3260
+ */
3261
+ KnownSearchAudience["AzureGovernment"] = "https://search.azure.us";
3262
+ /**
3263
+ * Audience for Azure Public
3264
+ */
3265
+ KnownSearchAudience["AzurePublicCloud"] = "https://search.azure.com";
3266
+ })(exports.KnownSearchAudience || (exports.KnownSearchAudience = {}));
3216
3267
 
3217
3268
  // Copyright (c) Microsoft Corporation.
3218
3269
  /**
@@ -3220,7 +3271,7 @@ function delay(timeInMs) {
3220
3271
  * including querying documents in the index as well as
3221
3272
  * adding, updating, and removing them.
3222
3273
  */
3223
- class SearchClient$1 {
3274
+ class SearchClient {
3224
3275
  /**
3225
3276
  * Creates an instance of SearchClient.
3226
3277
  *
@@ -3242,10 +3293,15 @@ class SearchClient$1 {
3242
3293
  constructor(endpoint, indexName, credential, options = {}) {
3243
3294
  /// Maintenance note: when updating supported API versions,
3244
3295
  /// the ContinuationToken logic will need to be updated below.
3296
+ /**
3297
+ * The service version to use when communicating with the service.
3298
+ */
3299
+ this.serviceVersion = defaultServiceVersion;
3245
3300
  /**
3246
3301
  * The API version to use when communicating with the service.
3302
+ * @deprecated use {@Link serviceVersion} instead
3247
3303
  */
3248
- this.apiVersion = "2020-06-30-Preview";
3304
+ this.apiVersion = defaultServiceVersion;
3249
3305
  this.endpoint = endpoint;
3250
3306
  this.indexName = indexName;
3251
3307
  const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;
@@ -3267,20 +3323,30 @@ class SearchClient$1 {
3267
3323
  "OData-MaxVersion",
3268
3324
  "OData-Version",
3269
3325
  "Prefer",
3270
- "throttle-reason"
3271
- ]
3272
- }
3326
+ "throttle-reason",
3327
+ ],
3328
+ },
3273
3329
  });
3274
- let apiVersion = this.apiVersion;
3275
3330
  if (options.apiVersion) {
3276
- if (!["2020-06-30", "2021-04-30-Preview"].includes(options.apiVersion)) {
3331
+ if (!serviceVersions.includes(options.apiVersion)) {
3277
3332
  throw new Error(`Invalid Api Version: ${options.apiVersion}`);
3278
3333
  }
3279
- apiVersion = options.apiVersion;
3334
+ this.serviceVersion = options.apiVersion;
3335
+ this.apiVersion = options.apiVersion;
3336
+ }
3337
+ if (options.serviceVersion) {
3338
+ if (!serviceVersions.includes(options.serviceVersion)) {
3339
+ throw new Error(`Invalid Service Version: ${options.serviceVersion}`);
3340
+ }
3341
+ this.serviceVersion = options.serviceVersion;
3342
+ this.apiVersion = options.serviceVersion;
3280
3343
  }
3281
- this.client = new SearchClient(this.endpoint, this.indexName, apiVersion, internalClientPipelineOptions);
3344
+ this.client = new SearchClient$1(this.endpoint, this.indexName, this.serviceVersion, internalClientPipelineOptions);
3282
3345
  if (coreAuth.isTokenCredential(credential)) {
3283
- this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: DEFAULT_SEARCH_SCOPE }));
3346
+ const scope = options.audience
3347
+ ? `${options.audience}/.default`
3348
+ : `${exports.KnownSearchAudience.AzurePublicCloud}/.default`;
3349
+ this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: scope }));
3284
3350
  }
3285
3351
  else {
3286
3352
  this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));
@@ -3302,8 +3368,8 @@ class SearchClient$1 {
3302
3368
  }
3303
3369
  catch (e) {
3304
3370
  span.setStatus({
3305
- code: coreTracing.SpanStatusCode.ERROR,
3306
- message: e.message
3371
+ status: "error",
3372
+ error: e.message,
3307
3373
  });
3308
3374
  throw e;
3309
3375
  }
@@ -3335,8 +3401,8 @@ class SearchClient$1 {
3335
3401
  }
3336
3402
  catch (e) {
3337
3403
  span.setStatus({
3338
- code: coreTracing.SpanStatusCode.ERROR,
3339
- message: e.message
3404
+ status: "error",
3405
+ error: e.message,
3340
3406
  });
3341
3407
  throw e;
3342
3408
  }
@@ -3359,14 +3425,14 @@ class SearchClient$1 {
3359
3425
  coverage,
3360
3426
  facets,
3361
3427
  answers,
3362
- continuationToken: this.encodeContinuationToken(nextLink, result.nextPageParameters)
3428
+ continuationToken: this.encodeContinuationToken(nextLink, result.nextPageParameters),
3363
3429
  };
3364
3430
  return deserialize(converted);
3365
3431
  }
3366
3432
  catch (e) {
3367
3433
  span.setStatus({
3368
- code: coreTracing.SpanStatusCode.ERROR,
3369
- message: e.message
3434
+ status: "error",
3435
+ error: e.message,
3370
3436
  });
3371
3437
  throw e;
3372
3438
  }
@@ -3395,7 +3461,7 @@ class SearchClient$1 {
3395
3461
  if (firstPage.continuationToken) {
3396
3462
  try {
3397
3463
  for (var _b = tslib.__asyncValues(this.listSearchResultsPage(searchText, options, {
3398
- continuationToken: firstPage.continuationToken
3464
+ continuationToken: firstPage.continuationToken,
3399
3465
  })), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
3400
3466
  const page = _c.value;
3401
3467
  yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page.results)));
@@ -3422,7 +3488,7 @@ class SearchClient$1 {
3422
3488
  },
3423
3489
  byPage: (settings = {}) => {
3424
3490
  return this.listSearchResultsPage(searchText, options, settings);
3425
- }
3491
+ },
3426
3492
  };
3427
3493
  }
3428
3494
  /**
@@ -3441,13 +3507,13 @@ class SearchClient$1 {
3441
3507
  coverage,
3442
3508
  facets,
3443
3509
  answers,
3444
- results: this.listSearchResults(pageResult, searchText, updatedOptions)
3510
+ results: this.listSearchResults(pageResult, searchText, updatedOptions),
3445
3511
  };
3446
3512
  }
3447
3513
  catch (e) {
3448
3514
  span.setStatus({
3449
- code: coreTracing.SpanStatusCode.ERROR,
3450
- message: e.message
3515
+ status: "error",
3516
+ error: e.message,
3451
3517
  });
3452
3518
  throw e;
3453
3519
  }
@@ -3480,8 +3546,8 @@ class SearchClient$1 {
3480
3546
  }
3481
3547
  catch (e) {
3482
3548
  span.setStatus({
3483
- code: coreTracing.SpanStatusCode.ERROR,
3484
- message: e.message
3549
+ status: "error",
3550
+ error: e.message,
3485
3551
  });
3486
3552
  throw e;
3487
3553
  }
@@ -3502,8 +3568,8 @@ class SearchClient$1 {
3502
3568
  }
3503
3569
  catch (e) {
3504
3570
  span.setStatus({
3505
- code: coreTracing.SpanStatusCode.ERROR,
3506
- message: e.message
3571
+ status: "error",
3572
+ error: e.message,
3507
3573
  });
3508
3574
  throw e;
3509
3575
  }
@@ -3537,8 +3603,8 @@ class SearchClient$1 {
3537
3603
  }
3538
3604
  catch (e) {
3539
3605
  span.setStatus({
3540
- code: coreTracing.SpanStatusCode.ERROR,
3541
- message: e.message
3606
+ status: "error",
3607
+ error: e.message,
3542
3608
  });
3543
3609
  throw e;
3544
3610
  }
@@ -3560,8 +3626,8 @@ class SearchClient$1 {
3560
3626
  }
3561
3627
  catch (e) {
3562
3628
  span.setStatus({
3563
- code: coreTracing.SpanStatusCode.ERROR,
3564
- message: e.message
3629
+ status: "error",
3630
+ error: e.message,
3565
3631
  });
3566
3632
  throw e;
3567
3633
  }
@@ -3584,8 +3650,8 @@ class SearchClient$1 {
3584
3650
  }
3585
3651
  catch (e) {
3586
3652
  span.setStatus({
3587
- code: coreTracing.SpanStatusCode.ERROR,
3588
- message: e.message
3653
+ status: "error",
3654
+ error: e.message,
3589
3655
  });
3590
3656
  throw e;
3591
3657
  }
@@ -3608,8 +3674,8 @@ class SearchClient$1 {
3608
3674
  }
3609
3675
  catch (e) {
3610
3676
  span.setStatus({
3611
- code: coreTracing.SpanStatusCode.ERROR,
3612
- message: e.message
3677
+ status: "error",
3678
+ error: e.message,
3613
3679
  });
3614
3680
  throw e;
3615
3681
  }
@@ -3631,8 +3697,8 @@ class SearchClient$1 {
3631
3697
  }
3632
3698
  catch (e) {
3633
3699
  span.setStatus({
3634
- code: coreTracing.SpanStatusCode.ERROR,
3635
- message: e.message
3700
+ status: "error",
3701
+ error: e.message,
3636
3702
  });
3637
3703
  throw e;
3638
3704
  }
@@ -3647,7 +3713,7 @@ class SearchClient$1 {
3647
3713
  const payload = JSON.stringify({
3648
3714
  apiVersion: this.apiVersion,
3649
3715
  nextLink,
3650
- nextPageParameters
3716
+ nextPageParameters,
3651
3717
  });
3652
3718
  return encode(payload);
3653
3719
  }
@@ -3663,7 +3729,7 @@ class SearchClient$1 {
3663
3729
  }
3664
3730
  return {
3665
3731
  nextLink: result.nextLink,
3666
- nextPageParameters: result.nextPageParameters
3732
+ nextPageParameters: result.nextPageParameters,
3667
3733
  };
3668
3734
  }
3669
3735
  catch (e) {
@@ -3677,9 +3743,9 @@ class SearchClient$1 {
3677
3743
  operationOptions: {
3678
3744
  abortSignal,
3679
3745
  requestOptions,
3680
- tracingOptions
3746
+ tracingOptions,
3681
3747
  },
3682
- restOptions
3748
+ restOptions,
3683
3749
  };
3684
3750
  }
3685
3751
  convertSelect(select) {
@@ -3742,7 +3808,7 @@ class SearchIndexingBufferedSender {
3742
3808
  /**
3743
3809
  * Event emitter/publisher used in the Buffered Sender
3744
3810
  */
3745
- this.emitter = new EventEmitter();
3811
+ this.emitter = new EventEmitter__default["default"]();
3746
3812
  this.client = client;
3747
3813
  this.documentKeyRetriever = documentKeyRetriever;
3748
3814
  // General Configuration properties
@@ -3774,14 +3840,14 @@ class SearchIndexingBufferedSender {
3774
3840
  this.batchObject.upload(documents);
3775
3841
  this.emitter.emit("batchAdded", {
3776
3842
  action: "upload",
3777
- documents
3843
+ documents,
3778
3844
  });
3779
3845
  return this.internalFlush(false, updatedOptions);
3780
3846
  }
3781
3847
  catch (e) {
3782
3848
  span.setStatus({
3783
- code: coreTracing.SpanStatusCode.ERROR,
3784
- message: e.message
3849
+ status: "error",
3850
+ error: e.message,
3785
3851
  });
3786
3852
  throw e;
3787
3853
  }
@@ -3801,14 +3867,14 @@ class SearchIndexingBufferedSender {
3801
3867
  this.batchObject.merge(documents);
3802
3868
  this.emitter.emit("batchAdded", {
3803
3869
  action: "merge",
3804
- documents
3870
+ documents,
3805
3871
  });
3806
3872
  return this.internalFlush(false, updatedOptions);
3807
3873
  }
3808
3874
  catch (e) {
3809
3875
  span.setStatus({
3810
- code: coreTracing.SpanStatusCode.ERROR,
3811
- message: e.message
3876
+ status: "error",
3877
+ error: e.message,
3812
3878
  });
3813
3879
  throw e;
3814
3880
  }
@@ -3828,14 +3894,14 @@ class SearchIndexingBufferedSender {
3828
3894
  this.batchObject.mergeOrUpload(documents);
3829
3895
  this.emitter.emit("batchAdded", {
3830
3896
  action: "mergeOrUpload",
3831
- documents
3897
+ documents,
3832
3898
  });
3833
3899
  return this.internalFlush(false, updatedOptions);
3834
3900
  }
3835
3901
  catch (e) {
3836
3902
  span.setStatus({
3837
- code: coreTracing.SpanStatusCode.ERROR,
3838
- message: e.message
3903
+ status: "error",
3904
+ error: e.message,
3839
3905
  });
3840
3906
  throw e;
3841
3907
  }
@@ -3855,14 +3921,14 @@ class SearchIndexingBufferedSender {
3855
3921
  this.batchObject.delete(documents);
3856
3922
  this.emitter.emit("batchAdded", {
3857
3923
  action: "delete",
3858
- documents
3924
+ documents,
3859
3925
  });
3860
3926
  return this.internalFlush(false, updatedOptions);
3861
3927
  }
3862
3928
  catch (e) {
3863
3929
  span.setStatus({
3864
- code: coreTracing.SpanStatusCode.ERROR,
3865
- message: e.message
3930
+ status: "error",
3931
+ error: e.message,
3866
3932
  });
3867
3933
  throw e;
3868
3934
  }
@@ -3884,8 +3950,8 @@ class SearchIndexingBufferedSender {
3884
3950
  }
3885
3951
  catch (e) {
3886
3952
  span.setStatus({
3887
- code: coreTracing.SpanStatusCode.ERROR,
3888
- message: e.message
3953
+ status: "error",
3954
+ error: e.message,
3889
3955
  });
3890
3956
  throw e;
3891
3957
  }
@@ -3956,7 +4022,7 @@ class SearchIndexingBufferedSender {
3956
4022
  // Cut the payload size to half
3957
4023
  const splitActionsArray = [
3958
4024
  actionsToSend.slice(0, actionsToSend.length / 2),
3959
- actionsToSend.slice(actionsToSend.length / 2, actionsToSend.length)
4025
+ actionsToSend.slice(actionsToSend.length / 2, actionsToSend.length),
3960
4026
  ];
3961
4027
  this.initialBatchActionCount = splitActionsArray[0].length; // So, we do not want 413 happening again and again
3962
4028
  for (const actions of splitActionsArray) {
@@ -4227,7 +4293,7 @@ const AzureActiveDirectoryApplicationCredentials = {
4227
4293
  }
4228
4294
  }
4229
4295
  };
4230
- const SearchError$1 = {
4296
+ const SearchError = {
4231
4297
  type: {
4232
4298
  name: "Composite",
4233
4299
  className: "SearchError",
@@ -6315,6 +6381,61 @@ const AnalyzedTokenInfo = {
6315
6381
  }
6316
6382
  }
6317
6383
  };
6384
+ const SearchAlias = {
6385
+ type: {
6386
+ name: "Composite",
6387
+ className: "SearchAlias",
6388
+ modelProperties: {
6389
+ name: {
6390
+ serializedName: "name",
6391
+ required: true,
6392
+ type: {
6393
+ name: "String"
6394
+ }
6395
+ },
6396
+ indexes: {
6397
+ serializedName: "indexes",
6398
+ required: true,
6399
+ type: {
6400
+ name: "Sequence",
6401
+ element: {
6402
+ type: {
6403
+ name: "String"
6404
+ }
6405
+ }
6406
+ }
6407
+ },
6408
+ etag: {
6409
+ serializedName: "@odata\\.etag",
6410
+ type: {
6411
+ name: "String"
6412
+ }
6413
+ }
6414
+ }
6415
+ }
6416
+ };
6417
+ const ListAliasesResult = {
6418
+ type: {
6419
+ name: "Composite",
6420
+ className: "ListAliasesResult",
6421
+ modelProperties: {
6422
+ aliases: {
6423
+ serializedName: "value",
6424
+ required: true,
6425
+ readOnly: true,
6426
+ type: {
6427
+ name: "Sequence",
6428
+ element: {
6429
+ type: {
6430
+ name: "Composite",
6431
+ className: "SearchAlias"
6432
+ }
6433
+ }
6434
+ }
6435
+ }
6436
+ }
6437
+ }
6438
+ };
6318
6439
  const ServiceStatistics = {
6319
6440
  type: {
6320
6441
  name: "Composite",
@@ -6342,6 +6463,13 @@ const ServiceCounters = {
6342
6463
  name: "Composite",
6343
6464
  className: "ServiceCounters",
6344
6465
  modelProperties: {
6466
+ aliasCounter: {
6467
+ serializedName: "aliasesCount",
6468
+ type: {
6469
+ name: "Composite",
6470
+ className: "ResourceCounter"
6471
+ }
6472
+ },
6345
6473
  documentCounter: {
6346
6474
  serializedName: "documentCount",
6347
6475
  type: {
@@ -7286,26 +7414,72 @@ const WebApiSkill = {
7286
7414
  } })
7287
7415
  }
7288
7416
  };
7289
- const DefaultCognitiveServicesAccount = {
7290
- serializedName: "#Microsoft.Azure.Search.DefaultCognitiveServices",
7291
- type: {
7292
- name: "Composite",
7293
- className: "DefaultCognitiveServicesAccount",
7294
- uberParent: "CognitiveServicesAccount",
7295
- polymorphicDiscriminator: CognitiveServicesAccount.type.polymorphicDiscriminator,
7296
- modelProperties: Object.assign({}, CognitiveServicesAccount.type.modelProperties)
7297
- }
7298
- };
7299
- const CognitiveServicesAccountKey = {
7300
- serializedName: "#Microsoft.Azure.Search.CognitiveServicesByKey",
7417
+ const AzureMachineLearningSkill = {
7418
+ serializedName: "#Microsoft.Skills.Custom.AmlSkill",
7301
7419
  type: {
7302
7420
  name: "Composite",
7303
- className: "CognitiveServicesAccountKey",
7304
- uberParent: "CognitiveServicesAccount",
7305
- polymorphicDiscriminator: CognitiveServicesAccount.type.polymorphicDiscriminator,
7306
- modelProperties: Object.assign(Object.assign({}, CognitiveServicesAccount.type.modelProperties), { key: {
7307
- serializedName: "key",
7308
- required: true,
7421
+ className: "AzureMachineLearningSkill",
7422
+ uberParent: "SearchIndexerSkill",
7423
+ polymorphicDiscriminator: SearchIndexerSkill.type.polymorphicDiscriminator,
7424
+ modelProperties: Object.assign(Object.assign({}, SearchIndexerSkill.type.modelProperties), { scoringUri: {
7425
+ serializedName: "uri",
7426
+ nullable: true,
7427
+ type: {
7428
+ name: "String"
7429
+ }
7430
+ }, authenticationKey: {
7431
+ serializedName: "key",
7432
+ nullable: true,
7433
+ type: {
7434
+ name: "String"
7435
+ }
7436
+ }, resourceId: {
7437
+ serializedName: "resourceId",
7438
+ nullable: true,
7439
+ type: {
7440
+ name: "String"
7441
+ }
7442
+ }, timeout: {
7443
+ serializedName: "timeout",
7444
+ nullable: true,
7445
+ type: {
7446
+ name: "TimeSpan"
7447
+ }
7448
+ }, region: {
7449
+ serializedName: "region",
7450
+ nullable: true,
7451
+ type: {
7452
+ name: "String"
7453
+ }
7454
+ }, degreeOfParallelism: {
7455
+ serializedName: "degreeOfParallelism",
7456
+ nullable: true,
7457
+ type: {
7458
+ name: "Number"
7459
+ }
7460
+ } })
7461
+ }
7462
+ };
7463
+ const DefaultCognitiveServicesAccount = {
7464
+ serializedName: "#Microsoft.Azure.Search.DefaultCognitiveServices",
7465
+ type: {
7466
+ name: "Composite",
7467
+ className: "DefaultCognitiveServicesAccount",
7468
+ uberParent: "CognitiveServicesAccount",
7469
+ polymorphicDiscriminator: CognitiveServicesAccount.type.polymorphicDiscriminator,
7470
+ modelProperties: Object.assign({}, CognitiveServicesAccount.type.modelProperties)
7471
+ }
7472
+ };
7473
+ const CognitiveServicesAccountKey = {
7474
+ serializedName: "#Microsoft.Azure.Search.CognitiveServicesByKey",
7475
+ type: {
7476
+ name: "Composite",
7477
+ className: "CognitiveServicesAccountKey",
7478
+ uberParent: "CognitiveServicesAccount",
7479
+ polymorphicDiscriminator: CognitiveServicesAccount.type.polymorphicDiscriminator,
7480
+ modelProperties: Object.assign(Object.assign({}, CognitiveServicesAccount.type.modelProperties), { key: {
7481
+ serializedName: "key",
7482
+ required: true,
7309
7483
  type: {
7310
7484
  name: "String"
7311
7485
  }
@@ -8944,6 +9118,7 @@ let discriminators = {
8944
9118
  "SearchIndexerSkill.#Microsoft.Skills.Text.TranslationSkill": TextTranslationSkill,
8945
9119
  "SearchIndexerSkill.#Microsoft.Skills.Util.DocumentExtractionSkill": DocumentExtractionSkill,
8946
9120
  "SearchIndexerSkill.#Microsoft.Skills.Custom.WebApiSkill": WebApiSkill,
9121
+ "SearchIndexerSkill.#Microsoft.Skills.Custom.AmlSkill": AzureMachineLearningSkill,
8947
9122
  "CognitiveServicesAccount.#Microsoft.Azure.Search.DefaultCognitiveServices": DefaultCognitiveServicesAccount,
8948
9123
  "CognitiveServicesAccount.#Microsoft.Azure.Search.CognitiveServicesByKey": CognitiveServicesAccountKey,
8949
9124
  "ScoringFunction.distance": DistanceScoringFunction,
@@ -8998,7 +9173,7 @@ let discriminators = {
8998
9173
  "Similarity.#Microsoft.Azure.Search.BM25Similarity": BM25Similarity
8999
9174
  };
9000
9175
 
9001
- var Mappers$1 = /*#__PURE__*/Object.freeze({
9176
+ var Mappers = /*#__PURE__*/Object.freeze({
9002
9177
  __proto__: null,
9003
9178
  SearchIndexerDataSource: SearchIndexerDataSource,
9004
9179
  DataSourceCredentials: DataSourceCredentials,
@@ -9008,7 +9183,7 @@ var Mappers$1 = /*#__PURE__*/Object.freeze({
9008
9183
  DataDeletionDetectionPolicy: DataDeletionDetectionPolicy,
9009
9184
  SearchResourceEncryptionKey: SearchResourceEncryptionKey,
9010
9185
  AzureActiveDirectoryApplicationCredentials: AzureActiveDirectoryApplicationCredentials,
9011
- SearchError: SearchError$1,
9186
+ SearchError: SearchError,
9012
9187
  ListDataSourcesResult: ListDataSourcesResult,
9013
9188
  DocumentKeysOrIds: DocumentKeysOrIds,
9014
9189
  SearchIndexer: SearchIndexer,
@@ -9059,6 +9234,8 @@ var Mappers$1 = /*#__PURE__*/Object.freeze({
9059
9234
  AnalyzeRequest: AnalyzeRequest,
9060
9235
  AnalyzeResult: AnalyzeResult,
9061
9236
  AnalyzedTokenInfo: AnalyzedTokenInfo,
9237
+ SearchAlias: SearchAlias,
9238
+ ListAliasesResult: ListAliasesResult,
9062
9239
  ServiceStatistics: ServiceStatistics,
9063
9240
  ServiceCounters: ServiceCounters,
9064
9241
  ResourceCounter: ResourceCounter,
@@ -9092,6 +9269,7 @@ var Mappers$1 = /*#__PURE__*/Object.freeze({
9092
9269
  TextTranslationSkill: TextTranslationSkill,
9093
9270
  DocumentExtractionSkill: DocumentExtractionSkill,
9094
9271
  WebApiSkill: WebApiSkill,
9272
+ AzureMachineLearningSkill: AzureMachineLearningSkill,
9095
9273
  DefaultCognitiveServicesAccount: DefaultCognitiveServicesAccount,
9096
9274
  CognitiveServicesAccountKey: CognitiveServicesAccountKey,
9097
9275
  SearchIndexerKnowledgeStoreTableProjectionSelector: SearchIndexerKnowledgeStoreTableProjectionSelector,
@@ -9158,7 +9336,7 @@ var Mappers$1 = /*#__PURE__*/Object.freeze({
9158
9336
  * Code generated by Microsoft (R) AutoRest Code Generator.
9159
9337
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9160
9338
  */
9161
- const contentType$1 = {
9339
+ const contentType = {
9162
9340
  parameterPath: ["options", "contentType"],
9163
9341
  mapper: {
9164
9342
  defaultValue: "application/json",
@@ -9173,7 +9351,7 @@ const dataSource = {
9173
9351
  parameterPath: "dataSource",
9174
9352
  mapper: SearchIndexerDataSource
9175
9353
  };
9176
- const accept$1 = {
9354
+ const accept = {
9177
9355
  parameterPath: "accept",
9178
9356
  mapper: {
9179
9357
  defaultValue: "application/json",
@@ -9184,7 +9362,7 @@ const accept$1 = {
9184
9362
  }
9185
9363
  }
9186
9364
  };
9187
- const endpoint$1 = {
9365
+ const endpoint = {
9188
9366
  parameterPath: "endpoint",
9189
9367
  mapper: {
9190
9368
  serializedName: "endpoint",
@@ -9205,7 +9383,7 @@ const dataSourceName = {
9205
9383
  }
9206
9384
  }
9207
9385
  };
9208
- const xMsClientRequestId$1 = {
9386
+ const xMsClientRequestId = {
9209
9387
  parameterPath: ["options", "requestOptionsParam", "xMsClientRequestId"],
9210
9388
  mapper: {
9211
9389
  serializedName: "x-ms-client-request-id",
@@ -9243,7 +9421,7 @@ const prefer = {
9243
9421
  }
9244
9422
  }
9245
9423
  };
9246
- const apiVersion$1 = {
9424
+ const apiVersion = {
9247
9425
  parameterPath: "apiVersion",
9248
9426
  mapper: {
9249
9427
  serializedName: "api-version",
@@ -9262,7 +9440,7 @@ const skipIndexerResetRequirementForCache = {
9262
9440
  }
9263
9441
  }
9264
9442
  };
9265
- const select$1 = {
9443
+ const select = {
9266
9444
  parameterPath: ["options", "select"],
9267
9445
  mapper: {
9268
9446
  serializedName: "$select",
@@ -9344,7 +9522,7 @@ const index = {
9344
9522
  parameterPath: "index",
9345
9523
  mapper: SearchIndex
9346
9524
  };
9347
- const indexName$1 = {
9525
+ const indexName = {
9348
9526
  parameterPath: "indexName",
9349
9527
  mapper: {
9350
9528
  serializedName: "indexName",
@@ -9367,6 +9545,20 @@ const request = {
9367
9545
  parameterPath: "request",
9368
9546
  mapper: AnalyzeRequest
9369
9547
  };
9548
+ const alias = {
9549
+ parameterPath: "alias",
9550
+ mapper: SearchAlias
9551
+ };
9552
+ const aliasName = {
9553
+ parameterPath: "aliasName",
9554
+ mapper: {
9555
+ serializedName: "aliasName",
9556
+ required: true,
9557
+ type: {
9558
+ name: "String"
9559
+ }
9560
+ }
9561
+ };
9370
9562
 
9371
9563
  /*
9372
9564
  * Copyright (c) Microsoft Corporation.
@@ -9391,7 +9583,7 @@ class DataSourcesImpl {
9391
9583
  * @param options The options parameters.
9392
9584
  */
9393
9585
  createOrUpdate(dataSourceName, dataSource, options) {
9394
- return this.client.sendOperationRequest({ dataSourceName, dataSource, options }, createOrUpdateOperationSpec);
9586
+ return this.client.sendOperationRequest({ dataSourceName, dataSource, options }, createOrUpdateOperationSpec$5);
9395
9587
  }
9396
9588
  /**
9397
9589
  * Deletes a datasource.
@@ -9399,7 +9591,7 @@ class DataSourcesImpl {
9399
9591
  * @param options The options parameters.
9400
9592
  */
9401
9593
  delete(dataSourceName, options) {
9402
- return this.client.sendOperationRequest({ dataSourceName, options }, deleteOperationSpec);
9594
+ return this.client.sendOperationRequest({ dataSourceName, options }, deleteOperationSpec$5);
9403
9595
  }
9404
9596
  /**
9405
9597
  * Retrieves a datasource definition.
@@ -9407,14 +9599,14 @@ class DataSourcesImpl {
9407
9599
  * @param options The options parameters.
9408
9600
  */
9409
9601
  get(dataSourceName, options) {
9410
- return this.client.sendOperationRequest({ dataSourceName, options }, getOperationSpec$1);
9602
+ return this.client.sendOperationRequest({ dataSourceName, options }, getOperationSpec$5);
9411
9603
  }
9412
9604
  /**
9413
9605
  * Lists all datasources available for a search service.
9414
9606
  * @param options The options parameters.
9415
9607
  */
9416
9608
  list(options) {
9417
- return this.client.sendOperationRequest({ options }, listOperationSpec);
9609
+ return this.client.sendOperationRequest({ options }, listOperationSpec$5);
9418
9610
  }
9419
9611
  /**
9420
9612
  * Creates a new datasource.
@@ -9422,12 +9614,12 @@ class DataSourcesImpl {
9422
9614
  * @param options The options parameters.
9423
9615
  */
9424
9616
  create(dataSource, options) {
9425
- return this.client.sendOperationRequest({ dataSource, options }, createOperationSpec);
9617
+ return this.client.sendOperationRequest({ dataSource, options }, createOperationSpec$5);
9426
9618
  }
9427
9619
  }
9428
9620
  // Operation Specifications
9429
- const serializer$1 = coreClient.createSerializer(Mappers$1, /* isXml */ false);
9430
- const createOrUpdateOperationSpec = {
9621
+ const serializer$6 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
9622
+ const createOrUpdateOperationSpec$5 = {
9431
9623
  path: "/datasources('{dataSourceName}')",
9432
9624
  httpMethod: "PUT",
9433
9625
  responses: {
@@ -9438,47 +9630,47 @@ const createOrUpdateOperationSpec = {
9438
9630
  bodyMapper: SearchIndexerDataSource
9439
9631
  },
9440
9632
  default: {
9441
- bodyMapper: SearchError$1
9633
+ bodyMapper: SearchError
9442
9634
  }
9443
9635
  },
9444
9636
  requestBody: dataSource,
9445
9637
  queryParameters: [
9446
- apiVersion$1,
9638
+ apiVersion,
9447
9639
  skipIndexerResetRequirementForCache
9448
9640
  ],
9449
- urlParameters: [endpoint$1, dataSourceName],
9641
+ urlParameters: [endpoint, dataSourceName],
9450
9642
  headerParameters: [
9451
- contentType$1,
9452
- accept$1,
9453
- xMsClientRequestId$1,
9643
+ contentType,
9644
+ accept,
9645
+ xMsClientRequestId,
9454
9646
  ifMatch,
9455
9647
  ifNoneMatch,
9456
9648
  prefer
9457
9649
  ],
9458
9650
  mediaType: "json",
9459
- serializer: serializer$1
9651
+ serializer: serializer$6
9460
9652
  };
9461
- const deleteOperationSpec = {
9653
+ const deleteOperationSpec$5 = {
9462
9654
  path: "/datasources('{dataSourceName}')",
9463
9655
  httpMethod: "DELETE",
9464
9656
  responses: {
9465
9657
  204: {},
9466
9658
  404: {},
9467
9659
  default: {
9468
- bodyMapper: SearchError$1
9660
+ bodyMapper: SearchError
9469
9661
  }
9470
9662
  },
9471
- queryParameters: [apiVersion$1],
9472
- urlParameters: [endpoint$1, dataSourceName],
9663
+ queryParameters: [apiVersion],
9664
+ urlParameters: [endpoint, dataSourceName],
9473
9665
  headerParameters: [
9474
- accept$1,
9475
- xMsClientRequestId$1,
9666
+ accept,
9667
+ xMsClientRequestId,
9476
9668
  ifMatch,
9477
9669
  ifNoneMatch
9478
9670
  ],
9479
- serializer: serializer$1
9671
+ serializer: serializer$6
9480
9672
  };
9481
- const getOperationSpec$1 = {
9673
+ const getOperationSpec$5 = {
9482
9674
  path: "/datasources('{dataSourceName}')",
9483
9675
  httpMethod: "GET",
9484
9676
  responses: {
@@ -9486,15 +9678,15 @@ const getOperationSpec$1 = {
9486
9678
  bodyMapper: SearchIndexerDataSource
9487
9679
  },
9488
9680
  default: {
9489
- bodyMapper: SearchError$1
9681
+ bodyMapper: SearchError
9490
9682
  }
9491
9683
  },
9492
- queryParameters: [apiVersion$1],
9493
- urlParameters: [endpoint$1, dataSourceName],
9494
- headerParameters: [accept$1, xMsClientRequestId$1],
9495
- serializer: serializer$1
9684
+ queryParameters: [apiVersion],
9685
+ urlParameters: [endpoint, dataSourceName],
9686
+ headerParameters: [accept, xMsClientRequestId],
9687
+ serializer: serializer$6
9496
9688
  };
9497
- const listOperationSpec = {
9689
+ const listOperationSpec$5 = {
9498
9690
  path: "/datasources",
9499
9691
  httpMethod: "GET",
9500
9692
  responses: {
@@ -9502,15 +9694,15 @@ const listOperationSpec = {
9502
9694
  bodyMapper: ListDataSourcesResult
9503
9695
  },
9504
9696
  default: {
9505
- bodyMapper: SearchError$1
9697
+ bodyMapper: SearchError
9506
9698
  }
9507
9699
  },
9508
- queryParameters: [apiVersion$1, select$1],
9509
- urlParameters: [endpoint$1],
9510
- headerParameters: [accept$1, xMsClientRequestId$1],
9511
- serializer: serializer$1
9700
+ queryParameters: [apiVersion, select],
9701
+ urlParameters: [endpoint],
9702
+ headerParameters: [accept, xMsClientRequestId],
9703
+ serializer: serializer$6
9512
9704
  };
9513
- const createOperationSpec = {
9705
+ const createOperationSpec$5 = {
9514
9706
  path: "/datasources",
9515
9707
  httpMethod: "POST",
9516
9708
  responses: {
@@ -9518,19 +9710,19 @@ const createOperationSpec = {
9518
9710
  bodyMapper: SearchIndexerDataSource
9519
9711
  },
9520
9712
  default: {
9521
- bodyMapper: SearchError$1
9713
+ bodyMapper: SearchError
9522
9714
  }
9523
9715
  },
9524
9716
  requestBody: dataSource,
9525
- queryParameters: [apiVersion$1],
9526
- urlParameters: [endpoint$1],
9717
+ queryParameters: [apiVersion],
9718
+ urlParameters: [endpoint],
9527
9719
  headerParameters: [
9528
- contentType$1,
9529
- accept$1,
9530
- xMsClientRequestId$1
9720
+ contentType,
9721
+ accept,
9722
+ xMsClientRequestId
9531
9723
  ],
9532
9724
  mediaType: "json",
9533
- serializer: serializer$1
9725
+ serializer: serializer$6
9534
9726
  };
9535
9727
 
9536
9728
  /*
@@ -9580,7 +9772,7 @@ class IndexersImpl {
9580
9772
  * @param options The options parameters.
9581
9773
  */
9582
9774
  createOrUpdate(indexerName, indexer, options) {
9583
- return this.client.sendOperationRequest({ indexerName, indexer, options }, createOrUpdateOperationSpec$1);
9775
+ return this.client.sendOperationRequest({ indexerName, indexer, options }, createOrUpdateOperationSpec$4);
9584
9776
  }
9585
9777
  /**
9586
9778
  * Deletes an indexer.
@@ -9588,7 +9780,7 @@ class IndexersImpl {
9588
9780
  * @param options The options parameters.
9589
9781
  */
9590
9782
  delete(indexerName, options) {
9591
- return this.client.sendOperationRequest({ indexerName, options }, deleteOperationSpec$1);
9783
+ return this.client.sendOperationRequest({ indexerName, options }, deleteOperationSpec$4);
9592
9784
  }
9593
9785
  /**
9594
9786
  * Retrieves an indexer definition.
@@ -9596,14 +9788,14 @@ class IndexersImpl {
9596
9788
  * @param options The options parameters.
9597
9789
  */
9598
9790
  get(indexerName, options) {
9599
- return this.client.sendOperationRequest({ indexerName, options }, getOperationSpec$2);
9791
+ return this.client.sendOperationRequest({ indexerName, options }, getOperationSpec$4);
9600
9792
  }
9601
9793
  /**
9602
9794
  * Lists all indexers available for a search service.
9603
9795
  * @param options The options parameters.
9604
9796
  */
9605
9797
  list(options) {
9606
- return this.client.sendOperationRequest({ options }, listOperationSpec$1);
9798
+ return this.client.sendOperationRequest({ options }, listOperationSpec$4);
9607
9799
  }
9608
9800
  /**
9609
9801
  * Creates a new indexer.
@@ -9611,7 +9803,7 @@ class IndexersImpl {
9611
9803
  * @param options The options parameters.
9612
9804
  */
9613
9805
  create(indexer, options) {
9614
- return this.client.sendOperationRequest({ indexer, options }, createOperationSpec$1);
9806
+ return this.client.sendOperationRequest({ indexer, options }, createOperationSpec$4);
9615
9807
  }
9616
9808
  /**
9617
9809
  * Returns the current status and execution history of an indexer.
@@ -9623,20 +9815,20 @@ class IndexersImpl {
9623
9815
  }
9624
9816
  }
9625
9817
  // Operation Specifications
9626
- const serializer$2 = coreClient.createSerializer(Mappers$1, /* isXml */ false);
9818
+ const serializer$5 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
9627
9819
  const resetOperationSpec = {
9628
9820
  path: "/indexers('{indexerName}')/search.reset",
9629
9821
  httpMethod: "POST",
9630
9822
  responses: {
9631
9823
  204: {},
9632
9824
  default: {
9633
- bodyMapper: SearchError$1
9825
+ bodyMapper: SearchError
9634
9826
  }
9635
9827
  },
9636
- queryParameters: [apiVersion$1],
9637
- urlParameters: [endpoint$1, indexerName],
9638
- headerParameters: [accept$1, xMsClientRequestId$1],
9639
- serializer: serializer$2
9828
+ queryParameters: [apiVersion],
9829
+ urlParameters: [endpoint, indexerName],
9830
+ headerParameters: [accept, xMsClientRequestId],
9831
+ serializer: serializer$5
9640
9832
  };
9641
9833
  const resetDocsOperationSpec = {
9642
9834
  path: "/indexers('{indexerName}')/search.resetdocs",
@@ -9644,19 +9836,19 @@ const resetDocsOperationSpec = {
9644
9836
  responses: {
9645
9837
  204: {},
9646
9838
  default: {
9647
- bodyMapper: SearchError$1
9839
+ bodyMapper: SearchError
9648
9840
  }
9649
9841
  },
9650
9842
  requestBody: keysOrIds,
9651
- queryParameters: [apiVersion$1, overwrite],
9652
- urlParameters: [endpoint$1, indexerName],
9843
+ queryParameters: [apiVersion, overwrite],
9844
+ urlParameters: [endpoint, indexerName],
9653
9845
  headerParameters: [
9654
- contentType$1,
9655
- accept$1,
9656
- xMsClientRequestId$1
9846
+ contentType,
9847
+ accept,
9848
+ xMsClientRequestId
9657
9849
  ],
9658
9850
  mediaType: "json",
9659
- serializer: serializer$2
9851
+ serializer: serializer$5
9660
9852
  };
9661
9853
  const runOperationSpec = {
9662
9854
  path: "/indexers('{indexerName}')/search.run",
@@ -9664,15 +9856,15 @@ const runOperationSpec = {
9664
9856
  responses: {
9665
9857
  202: {},
9666
9858
  default: {
9667
- bodyMapper: SearchError$1
9859
+ bodyMapper: SearchError
9668
9860
  }
9669
9861
  },
9670
- queryParameters: [apiVersion$1],
9671
- urlParameters: [endpoint$1, indexerName],
9672
- headerParameters: [accept$1, xMsClientRequestId$1],
9673
- serializer: serializer$2
9862
+ queryParameters: [apiVersion],
9863
+ urlParameters: [endpoint, indexerName],
9864
+ headerParameters: [accept, xMsClientRequestId],
9865
+ serializer: serializer$5
9674
9866
  };
9675
- const createOrUpdateOperationSpec$1 = {
9867
+ const createOrUpdateOperationSpec$4 = {
9676
9868
  path: "/indexers('{indexerName}')",
9677
9869
  httpMethod: "PUT",
9678
9870
  responses: {
@@ -9683,48 +9875,48 @@ const createOrUpdateOperationSpec$1 = {
9683
9875
  bodyMapper: SearchIndexer
9684
9876
  },
9685
9877
  default: {
9686
- bodyMapper: SearchError$1
9878
+ bodyMapper: SearchError
9687
9879
  }
9688
9880
  },
9689
9881
  requestBody: indexer,
9690
9882
  queryParameters: [
9691
- apiVersion$1,
9883
+ apiVersion,
9692
9884
  skipIndexerResetRequirementForCache,
9693
9885
  disableCacheReprocessingChangeDetection
9694
9886
  ],
9695
- urlParameters: [endpoint$1, indexerName],
9887
+ urlParameters: [endpoint, indexerName],
9696
9888
  headerParameters: [
9697
- contentType$1,
9698
- accept$1,
9699
- xMsClientRequestId$1,
9889
+ contentType,
9890
+ accept,
9891
+ xMsClientRequestId,
9700
9892
  ifMatch,
9701
9893
  ifNoneMatch,
9702
9894
  prefer
9703
9895
  ],
9704
9896
  mediaType: "json",
9705
- serializer: serializer$2
9897
+ serializer: serializer$5
9706
9898
  };
9707
- const deleteOperationSpec$1 = {
9899
+ const deleteOperationSpec$4 = {
9708
9900
  path: "/indexers('{indexerName}')",
9709
9901
  httpMethod: "DELETE",
9710
9902
  responses: {
9711
9903
  204: {},
9712
9904
  404: {},
9713
9905
  default: {
9714
- bodyMapper: SearchError$1
9906
+ bodyMapper: SearchError
9715
9907
  }
9716
9908
  },
9717
- queryParameters: [apiVersion$1],
9718
- urlParameters: [endpoint$1, indexerName],
9909
+ queryParameters: [apiVersion],
9910
+ urlParameters: [endpoint, indexerName],
9719
9911
  headerParameters: [
9720
- accept$1,
9721
- xMsClientRequestId$1,
9912
+ accept,
9913
+ xMsClientRequestId,
9722
9914
  ifMatch,
9723
9915
  ifNoneMatch
9724
9916
  ],
9725
- serializer: serializer$2
9917
+ serializer: serializer$5
9726
9918
  };
9727
- const getOperationSpec$2 = {
9919
+ const getOperationSpec$4 = {
9728
9920
  path: "/indexers('{indexerName}')",
9729
9921
  httpMethod: "GET",
9730
9922
  responses: {
@@ -9732,15 +9924,15 @@ const getOperationSpec$2 = {
9732
9924
  bodyMapper: SearchIndexer
9733
9925
  },
9734
9926
  default: {
9735
- bodyMapper: SearchError$1
9927
+ bodyMapper: SearchError
9736
9928
  }
9737
9929
  },
9738
- queryParameters: [apiVersion$1],
9739
- urlParameters: [endpoint$1, indexerName],
9740
- headerParameters: [accept$1, xMsClientRequestId$1],
9741
- serializer: serializer$2
9930
+ queryParameters: [apiVersion],
9931
+ urlParameters: [endpoint, indexerName],
9932
+ headerParameters: [accept, xMsClientRequestId],
9933
+ serializer: serializer$5
9742
9934
  };
9743
- const listOperationSpec$1 = {
9935
+ const listOperationSpec$4 = {
9744
9936
  path: "/indexers",
9745
9937
  httpMethod: "GET",
9746
9938
  responses: {
@@ -9748,15 +9940,15 @@ const listOperationSpec$1 = {
9748
9940
  bodyMapper: ListIndexersResult
9749
9941
  },
9750
9942
  default: {
9751
- bodyMapper: SearchError$1
9943
+ bodyMapper: SearchError
9752
9944
  }
9753
9945
  },
9754
- queryParameters: [apiVersion$1, select$1],
9755
- urlParameters: [endpoint$1],
9756
- headerParameters: [accept$1, xMsClientRequestId$1],
9757
- serializer: serializer$2
9946
+ queryParameters: [apiVersion, select],
9947
+ urlParameters: [endpoint],
9948
+ headerParameters: [accept, xMsClientRequestId],
9949
+ serializer: serializer$5
9758
9950
  };
9759
- const createOperationSpec$1 = {
9951
+ const createOperationSpec$4 = {
9760
9952
  path: "/indexers",
9761
9953
  httpMethod: "POST",
9762
9954
  responses: {
@@ -9764,19 +9956,19 @@ const createOperationSpec$1 = {
9764
9956
  bodyMapper: SearchIndexer
9765
9957
  },
9766
9958
  default: {
9767
- bodyMapper: SearchError$1
9959
+ bodyMapper: SearchError
9768
9960
  }
9769
9961
  },
9770
9962
  requestBody: indexer,
9771
- queryParameters: [apiVersion$1],
9772
- urlParameters: [endpoint$1],
9963
+ queryParameters: [apiVersion],
9964
+ urlParameters: [endpoint],
9773
9965
  headerParameters: [
9774
- contentType$1,
9775
- accept$1,
9776
- xMsClientRequestId$1
9966
+ contentType,
9967
+ accept,
9968
+ xMsClientRequestId
9777
9969
  ],
9778
9970
  mediaType: "json",
9779
- serializer: serializer$2
9971
+ serializer: serializer$5
9780
9972
  };
9781
9973
  const getStatusOperationSpec = {
9782
9974
  path: "/indexers('{indexerName}')/search.status",
@@ -9786,13 +9978,13 @@ const getStatusOperationSpec = {
9786
9978
  bodyMapper: SearchIndexerStatus
9787
9979
  },
9788
9980
  default: {
9789
- bodyMapper: SearchError$1
9981
+ bodyMapper: SearchError
9790
9982
  }
9791
9983
  },
9792
- queryParameters: [apiVersion$1],
9793
- urlParameters: [endpoint$1, indexerName],
9794
- headerParameters: [accept$1, xMsClientRequestId$1],
9795
- serializer: serializer$2
9984
+ queryParameters: [apiVersion],
9985
+ urlParameters: [endpoint, indexerName],
9986
+ headerParameters: [accept, xMsClientRequestId],
9987
+ serializer: serializer$5
9796
9988
  };
9797
9989
 
9798
9990
  /*
@@ -9818,7 +10010,7 @@ class SkillsetsImpl {
9818
10010
  * @param options The options parameters.
9819
10011
  */
9820
10012
  createOrUpdate(skillsetName, skillset, options) {
9821
- return this.client.sendOperationRequest({ skillsetName, skillset, options }, createOrUpdateOperationSpec$2);
10013
+ return this.client.sendOperationRequest({ skillsetName, skillset, options }, createOrUpdateOperationSpec$3);
9822
10014
  }
9823
10015
  /**
9824
10016
  * Deletes a skillset in a search service.
@@ -9826,7 +10018,7 @@ class SkillsetsImpl {
9826
10018
  * @param options The options parameters.
9827
10019
  */
9828
10020
  delete(skillsetName, options) {
9829
- return this.client.sendOperationRequest({ skillsetName, options }, deleteOperationSpec$2);
10021
+ return this.client.sendOperationRequest({ skillsetName, options }, deleteOperationSpec$3);
9830
10022
  }
9831
10023
  /**
9832
10024
  * Retrieves a skillset in a search service.
@@ -9841,7 +10033,7 @@ class SkillsetsImpl {
9841
10033
  * @param options The options parameters.
9842
10034
  */
9843
10035
  list(options) {
9844
- return this.client.sendOperationRequest({ options }, listOperationSpec$2);
10036
+ return this.client.sendOperationRequest({ options }, listOperationSpec$3);
9845
10037
  }
9846
10038
  /**
9847
10039
  * Creates a new skillset in a search service.
@@ -9849,7 +10041,7 @@ class SkillsetsImpl {
9849
10041
  * @param options The options parameters.
9850
10042
  */
9851
10043
  create(skillset, options) {
9852
- return this.client.sendOperationRequest({ skillset, options }, createOperationSpec$2);
10044
+ return this.client.sendOperationRequest({ skillset, options }, createOperationSpec$3);
9853
10045
  }
9854
10046
  /**
9855
10047
  * Reset an existing skillset in a search service.
@@ -9862,8 +10054,8 @@ class SkillsetsImpl {
9862
10054
  }
9863
10055
  }
9864
10056
  // Operation Specifications
9865
- const serializer$3 = coreClient.createSerializer(Mappers$1, /* isXml */ false);
9866
- const createOrUpdateOperationSpec$2 = {
10057
+ const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10058
+ const createOrUpdateOperationSpec$3 = {
9867
10059
  path: "/skillsets('{skillsetName}')",
9868
10060
  httpMethod: "PUT",
9869
10061
  responses: {
@@ -9874,46 +10066,46 @@ const createOrUpdateOperationSpec$2 = {
9874
10066
  bodyMapper: SearchIndexerSkillset
9875
10067
  },
9876
10068
  default: {
9877
- bodyMapper: SearchError$1
10069
+ bodyMapper: SearchError
9878
10070
  }
9879
10071
  },
9880
10072
  requestBody: skillset,
9881
10073
  queryParameters: [
9882
- apiVersion$1,
10074
+ apiVersion,
9883
10075
  skipIndexerResetRequirementForCache,
9884
10076
  disableCacheReprocessingChangeDetection
9885
10077
  ],
9886
- urlParameters: [endpoint$1, skillsetName],
10078
+ urlParameters: [endpoint, skillsetName],
9887
10079
  headerParameters: [
9888
- contentType$1,
9889
- accept$1,
9890
- xMsClientRequestId$1,
10080
+ contentType,
10081
+ accept,
10082
+ xMsClientRequestId,
9891
10083
  ifMatch,
9892
10084
  ifNoneMatch,
9893
10085
  prefer
9894
10086
  ],
9895
10087
  mediaType: "json",
9896
- serializer: serializer$3
10088
+ serializer: serializer$4
9897
10089
  };
9898
- const deleteOperationSpec$2 = {
10090
+ const deleteOperationSpec$3 = {
9899
10091
  path: "/skillsets('{skillsetName}')",
9900
10092
  httpMethod: "DELETE",
9901
10093
  responses: {
9902
10094
  204: {},
9903
10095
  404: {},
9904
10096
  default: {
9905
- bodyMapper: SearchError$1
10097
+ bodyMapper: SearchError
9906
10098
  }
9907
10099
  },
9908
- queryParameters: [apiVersion$1],
9909
- urlParameters: [endpoint$1, skillsetName],
10100
+ queryParameters: [apiVersion],
10101
+ urlParameters: [endpoint, skillsetName],
9910
10102
  headerParameters: [
9911
- accept$1,
9912
- xMsClientRequestId$1,
10103
+ accept,
10104
+ xMsClientRequestId,
9913
10105
  ifMatch,
9914
10106
  ifNoneMatch
9915
10107
  ],
9916
- serializer: serializer$3
10108
+ serializer: serializer$4
9917
10109
  };
9918
10110
  const getOperationSpec$3 = {
9919
10111
  path: "/skillsets('{skillsetName}')",
@@ -9923,15 +10115,15 @@ const getOperationSpec$3 = {
9923
10115
  bodyMapper: SearchIndexerSkillset
9924
10116
  },
9925
10117
  default: {
9926
- bodyMapper: SearchError$1
10118
+ bodyMapper: SearchError
9927
10119
  }
9928
10120
  },
9929
- queryParameters: [apiVersion$1],
9930
- urlParameters: [endpoint$1, skillsetName],
9931
- headerParameters: [accept$1, xMsClientRequestId$1],
9932
- serializer: serializer$3
10121
+ queryParameters: [apiVersion],
10122
+ urlParameters: [endpoint, skillsetName],
10123
+ headerParameters: [accept, xMsClientRequestId],
10124
+ serializer: serializer$4
9933
10125
  };
9934
- const listOperationSpec$2 = {
10126
+ const listOperationSpec$3 = {
9935
10127
  path: "/skillsets",
9936
10128
  httpMethod: "GET",
9937
10129
  responses: {
@@ -9939,15 +10131,15 @@ const listOperationSpec$2 = {
9939
10131
  bodyMapper: ListSkillsetsResult
9940
10132
  },
9941
10133
  default: {
9942
- bodyMapper: SearchError$1
10134
+ bodyMapper: SearchError
9943
10135
  }
9944
10136
  },
9945
- queryParameters: [apiVersion$1, select$1],
9946
- urlParameters: [endpoint$1],
9947
- headerParameters: [accept$1, xMsClientRequestId$1],
9948
- serializer: serializer$3
10137
+ queryParameters: [apiVersion, select],
10138
+ urlParameters: [endpoint],
10139
+ headerParameters: [accept, xMsClientRequestId],
10140
+ serializer: serializer$4
9949
10141
  };
9950
- const createOperationSpec$2 = {
10142
+ const createOperationSpec$3 = {
9951
10143
  path: "/skillsets",
9952
10144
  httpMethod: "POST",
9953
10145
  responses: {
@@ -9955,19 +10147,19 @@ const createOperationSpec$2 = {
9955
10147
  bodyMapper: SearchIndexerSkillset
9956
10148
  },
9957
10149
  default: {
9958
- bodyMapper: SearchError$1
10150
+ bodyMapper: SearchError
9959
10151
  }
9960
10152
  },
9961
10153
  requestBody: skillset,
9962
- queryParameters: [apiVersion$1],
9963
- urlParameters: [endpoint$1],
10154
+ queryParameters: [apiVersion],
10155
+ urlParameters: [endpoint],
9964
10156
  headerParameters: [
9965
- contentType$1,
9966
- accept$1,
9967
- xMsClientRequestId$1
10157
+ contentType,
10158
+ accept,
10159
+ xMsClientRequestId
9968
10160
  ],
9969
10161
  mediaType: "json",
9970
- serializer: serializer$3
10162
+ serializer: serializer$4
9971
10163
  };
9972
10164
  const resetSkillsOperationSpec = {
9973
10165
  path: "/skillsets('{skillsetName}')/search.resetskills",
@@ -9975,19 +10167,19 @@ const resetSkillsOperationSpec = {
9975
10167
  responses: {
9976
10168
  204: {},
9977
10169
  default: {
9978
- bodyMapper: SearchError$1
10170
+ bodyMapper: SearchError
9979
10171
  }
9980
10172
  },
9981
10173
  requestBody: skillNames,
9982
- queryParameters: [apiVersion$1],
9983
- urlParameters: [endpoint$1, skillsetName],
10174
+ queryParameters: [apiVersion],
10175
+ urlParameters: [endpoint, skillsetName],
9984
10176
  headerParameters: [
9985
- contentType$1,
9986
- accept$1,
9987
- xMsClientRequestId$1
10177
+ contentType,
10178
+ accept,
10179
+ xMsClientRequestId
9988
10180
  ],
9989
10181
  mediaType: "json",
9990
- serializer: serializer$3
10182
+ serializer: serializer$4
9991
10183
  };
9992
10184
 
9993
10185
  /*
@@ -10013,7 +10205,7 @@ class SynonymMapsImpl {
10013
10205
  * @param options The options parameters.
10014
10206
  */
10015
10207
  createOrUpdate(synonymMapName, synonymMap, options) {
10016
- return this.client.sendOperationRequest({ synonymMapName, synonymMap, options }, createOrUpdateOperationSpec$3);
10208
+ return this.client.sendOperationRequest({ synonymMapName, synonymMap, options }, createOrUpdateOperationSpec$2);
10017
10209
  }
10018
10210
  /**
10019
10211
  * Deletes a synonym map.
@@ -10021,7 +10213,7 @@ class SynonymMapsImpl {
10021
10213
  * @param options The options parameters.
10022
10214
  */
10023
10215
  delete(synonymMapName, options) {
10024
- return this.client.sendOperationRequest({ synonymMapName, options }, deleteOperationSpec$3);
10216
+ return this.client.sendOperationRequest({ synonymMapName, options }, deleteOperationSpec$2);
10025
10217
  }
10026
10218
  /**
10027
10219
  * Retrieves a synonym map definition.
@@ -10029,14 +10221,14 @@ class SynonymMapsImpl {
10029
10221
  * @param options The options parameters.
10030
10222
  */
10031
10223
  get(synonymMapName, options) {
10032
- return this.client.sendOperationRequest({ synonymMapName, options }, getOperationSpec$4);
10224
+ return this.client.sendOperationRequest({ synonymMapName, options }, getOperationSpec$2);
10033
10225
  }
10034
10226
  /**
10035
10227
  * Lists all synonym maps available for a search service.
10036
10228
  * @param options The options parameters.
10037
10229
  */
10038
10230
  list(options) {
10039
- return this.client.sendOperationRequest({ options }, listOperationSpec$3);
10231
+ return this.client.sendOperationRequest({ options }, listOperationSpec$2);
10040
10232
  }
10041
10233
  /**
10042
10234
  * Creates a new synonym map.
@@ -10044,12 +10236,12 @@ class SynonymMapsImpl {
10044
10236
  * @param options The options parameters.
10045
10237
  */
10046
10238
  create(synonymMap, options) {
10047
- return this.client.sendOperationRequest({ synonymMap, options }, createOperationSpec$3);
10239
+ return this.client.sendOperationRequest({ synonymMap, options }, createOperationSpec$2);
10048
10240
  }
10049
10241
  }
10050
10242
  // Operation Specifications
10051
- const serializer$4 = coreClient.createSerializer(Mappers$1, /* isXml */ false);
10052
- const createOrUpdateOperationSpec$3 = {
10243
+ const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10244
+ const createOrUpdateOperationSpec$2 = {
10053
10245
  path: "/synonymmaps('{synonymMapName}')",
10054
10246
  httpMethod: "PUT",
10055
10247
  responses: {
@@ -10060,44 +10252,44 @@ const createOrUpdateOperationSpec$3 = {
10060
10252
  bodyMapper: SynonymMap
10061
10253
  },
10062
10254
  default: {
10063
- bodyMapper: SearchError$1
10255
+ bodyMapper: SearchError
10064
10256
  }
10065
10257
  },
10066
10258
  requestBody: synonymMap,
10067
- queryParameters: [apiVersion$1],
10068
- urlParameters: [endpoint$1, synonymMapName],
10259
+ queryParameters: [apiVersion],
10260
+ urlParameters: [endpoint, synonymMapName],
10069
10261
  headerParameters: [
10070
- contentType$1,
10071
- accept$1,
10072
- xMsClientRequestId$1,
10262
+ contentType,
10263
+ accept,
10264
+ xMsClientRequestId,
10073
10265
  ifMatch,
10074
10266
  ifNoneMatch,
10075
10267
  prefer
10076
10268
  ],
10077
10269
  mediaType: "json",
10078
- serializer: serializer$4
10270
+ serializer: serializer$3
10079
10271
  };
10080
- const deleteOperationSpec$3 = {
10272
+ const deleteOperationSpec$2 = {
10081
10273
  path: "/synonymmaps('{synonymMapName}')",
10082
10274
  httpMethod: "DELETE",
10083
10275
  responses: {
10084
10276
  204: {},
10085
10277
  404: {},
10086
10278
  default: {
10087
- bodyMapper: SearchError$1
10279
+ bodyMapper: SearchError
10088
10280
  }
10089
10281
  },
10090
- queryParameters: [apiVersion$1],
10091
- urlParameters: [endpoint$1, synonymMapName],
10282
+ queryParameters: [apiVersion],
10283
+ urlParameters: [endpoint, synonymMapName],
10092
10284
  headerParameters: [
10093
- accept$1,
10094
- xMsClientRequestId$1,
10285
+ accept,
10286
+ xMsClientRequestId,
10095
10287
  ifMatch,
10096
10288
  ifNoneMatch
10097
10289
  ],
10098
- serializer: serializer$4
10290
+ serializer: serializer$3
10099
10291
  };
10100
- const getOperationSpec$4 = {
10292
+ const getOperationSpec$2 = {
10101
10293
  path: "/synonymmaps('{synonymMapName}')",
10102
10294
  httpMethod: "GET",
10103
10295
  responses: {
@@ -10105,15 +10297,15 @@ const getOperationSpec$4 = {
10105
10297
  bodyMapper: SynonymMap
10106
10298
  },
10107
10299
  default: {
10108
- bodyMapper: SearchError$1
10300
+ bodyMapper: SearchError
10109
10301
  }
10110
10302
  },
10111
- queryParameters: [apiVersion$1],
10112
- urlParameters: [endpoint$1, synonymMapName],
10113
- headerParameters: [accept$1, xMsClientRequestId$1],
10114
- serializer: serializer$4
10303
+ queryParameters: [apiVersion],
10304
+ urlParameters: [endpoint, synonymMapName],
10305
+ headerParameters: [accept, xMsClientRequestId],
10306
+ serializer: serializer$3
10115
10307
  };
10116
- const listOperationSpec$3 = {
10308
+ const listOperationSpec$2 = {
10117
10309
  path: "/synonymmaps",
10118
10310
  httpMethod: "GET",
10119
10311
  responses: {
@@ -10121,15 +10313,15 @@ const listOperationSpec$3 = {
10121
10313
  bodyMapper: ListSynonymMapsResult
10122
10314
  },
10123
10315
  default: {
10124
- bodyMapper: SearchError$1
10316
+ bodyMapper: SearchError
10125
10317
  }
10126
10318
  },
10127
- queryParameters: [apiVersion$1, select$1],
10128
- urlParameters: [endpoint$1],
10129
- headerParameters: [accept$1, xMsClientRequestId$1],
10130
- serializer: serializer$4
10319
+ queryParameters: [apiVersion, select],
10320
+ urlParameters: [endpoint],
10321
+ headerParameters: [accept, xMsClientRequestId],
10322
+ serializer: serializer$3
10131
10323
  };
10132
- const createOperationSpec$3 = {
10324
+ const createOperationSpec$2 = {
10133
10325
  path: "/synonymmaps",
10134
10326
  httpMethod: "POST",
10135
10327
  responses: {
@@ -10137,19 +10329,19 @@ const createOperationSpec$3 = {
10137
10329
  bodyMapper: SynonymMap
10138
10330
  },
10139
10331
  default: {
10140
- bodyMapper: SearchError$1
10332
+ bodyMapper: SearchError
10141
10333
  }
10142
10334
  },
10143
10335
  requestBody: synonymMap,
10144
- queryParameters: [apiVersion$1],
10145
- urlParameters: [endpoint$1],
10336
+ queryParameters: [apiVersion],
10337
+ urlParameters: [endpoint],
10146
10338
  headerParameters: [
10147
- contentType$1,
10148
- accept$1,
10149
- xMsClientRequestId$1
10339
+ contentType,
10340
+ accept,
10341
+ xMsClientRequestId
10150
10342
  ],
10151
10343
  mediaType: "json",
10152
- serializer: serializer$4
10344
+ serializer: serializer$3
10153
10345
  };
10154
10346
 
10155
10347
  /*
@@ -10174,14 +10366,14 @@ class IndexesImpl {
10174
10366
  * @param options The options parameters.
10175
10367
  */
10176
10368
  create(index, options) {
10177
- return this.client.sendOperationRequest({ index, options }, createOperationSpec$4);
10369
+ return this.client.sendOperationRequest({ index, options }, createOperationSpec$1);
10178
10370
  }
10179
10371
  /**
10180
10372
  * Lists all indexes available for a search service.
10181
10373
  * @param options The options parameters.
10182
10374
  */
10183
10375
  list(options) {
10184
- return this.client.sendOperationRequest({ options }, listOperationSpec$4);
10376
+ return this.client.sendOperationRequest({ options }, listOperationSpec$1);
10185
10377
  }
10186
10378
  /**
10187
10379
  * Creates a new search index or updates an index if it already exists.
@@ -10190,7 +10382,7 @@ class IndexesImpl {
10190
10382
  * @param options The options parameters.
10191
10383
  */
10192
10384
  createOrUpdate(indexName, index, options) {
10193
- return this.client.sendOperationRequest({ indexName, index, options }, createOrUpdateOperationSpec$4);
10385
+ return this.client.sendOperationRequest({ indexName, index, options }, createOrUpdateOperationSpec$1);
10194
10386
  }
10195
10387
  /**
10196
10388
  * Deletes a search index and all the documents it contains. This operation is permanent, with no
@@ -10200,7 +10392,7 @@ class IndexesImpl {
10200
10392
  * @param options The options parameters.
10201
10393
  */
10202
10394
  delete(indexName, options) {
10203
- return this.client.sendOperationRequest({ indexName, options }, deleteOperationSpec$4);
10395
+ return this.client.sendOperationRequest({ indexName, options }, deleteOperationSpec$1);
10204
10396
  }
10205
10397
  /**
10206
10398
  * Retrieves an index definition.
@@ -10208,7 +10400,7 @@ class IndexesImpl {
10208
10400
  * @param options The options parameters.
10209
10401
  */
10210
10402
  get(indexName, options) {
10211
- return this.client.sendOperationRequest({ indexName, options }, getOperationSpec$5);
10403
+ return this.client.sendOperationRequest({ indexName, options }, getOperationSpec$1);
10212
10404
  }
10213
10405
  /**
10214
10406
  * Returns statistics for the given index, including a document count and storage usage.
@@ -10229,8 +10421,8 @@ class IndexesImpl {
10229
10421
  }
10230
10422
  }
10231
10423
  // Operation Specifications
10232
- const serializer$5 = coreClient.createSerializer(Mappers$1, /* isXml */ false);
10233
- const createOperationSpec$4 = {
10424
+ const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10425
+ const createOperationSpec$1 = {
10234
10426
  path: "/indexes",
10235
10427
  httpMethod: "POST",
10236
10428
  responses: {
@@ -10238,21 +10430,21 @@ const createOperationSpec$4 = {
10238
10430
  bodyMapper: SearchIndex
10239
10431
  },
10240
10432
  default: {
10241
- bodyMapper: SearchError$1
10433
+ bodyMapper: SearchError
10242
10434
  }
10243
10435
  },
10244
10436
  requestBody: index,
10245
- queryParameters: [apiVersion$1],
10246
- urlParameters: [endpoint$1],
10437
+ queryParameters: [apiVersion],
10438
+ urlParameters: [endpoint],
10247
10439
  headerParameters: [
10248
- contentType$1,
10249
- accept$1,
10250
- xMsClientRequestId$1
10440
+ contentType,
10441
+ accept,
10442
+ xMsClientRequestId
10251
10443
  ],
10252
10444
  mediaType: "json",
10253
- serializer: serializer$5
10445
+ serializer: serializer$2
10254
10446
  };
10255
- const listOperationSpec$4 = {
10447
+ const listOperationSpec$1 = {
10256
10448
  path: "/indexes",
10257
10449
  httpMethod: "GET",
10258
10450
  responses: {
@@ -10260,15 +10452,15 @@ const listOperationSpec$4 = {
10260
10452
  bodyMapper: ListIndexesResult
10261
10453
  },
10262
10454
  default: {
10263
- bodyMapper: SearchError$1
10455
+ bodyMapper: SearchError
10264
10456
  }
10265
10457
  },
10266
- queryParameters: [apiVersion$1, select$1],
10267
- urlParameters: [endpoint$1],
10268
- headerParameters: [accept$1, xMsClientRequestId$1],
10269
- serializer: serializer$5
10458
+ queryParameters: [apiVersion, select],
10459
+ urlParameters: [endpoint],
10460
+ headerParameters: [accept, xMsClientRequestId],
10461
+ serializer: serializer$2
10270
10462
  };
10271
- const createOrUpdateOperationSpec$4 = {
10463
+ const createOrUpdateOperationSpec$1 = {
10272
10464
  path: "/indexes('{indexName}')",
10273
10465
  httpMethod: "PUT",
10274
10466
  responses: {
@@ -10279,44 +10471,44 @@ const createOrUpdateOperationSpec$4 = {
10279
10471
  bodyMapper: SearchIndex
10280
10472
  },
10281
10473
  default: {
10282
- bodyMapper: SearchError$1
10474
+ bodyMapper: SearchError
10283
10475
  }
10284
10476
  },
10285
10477
  requestBody: index,
10286
- queryParameters: [apiVersion$1, allowIndexDowntime],
10287
- urlParameters: [endpoint$1, indexName$1],
10478
+ queryParameters: [apiVersion, allowIndexDowntime],
10479
+ urlParameters: [endpoint, indexName],
10288
10480
  headerParameters: [
10289
- contentType$1,
10290
- accept$1,
10291
- xMsClientRequestId$1,
10481
+ contentType,
10482
+ accept,
10483
+ xMsClientRequestId,
10292
10484
  ifMatch,
10293
10485
  ifNoneMatch,
10294
10486
  prefer
10295
10487
  ],
10296
10488
  mediaType: "json",
10297
- serializer: serializer$5
10489
+ serializer: serializer$2
10298
10490
  };
10299
- const deleteOperationSpec$4 = {
10491
+ const deleteOperationSpec$1 = {
10300
10492
  path: "/indexes('{indexName}')",
10301
10493
  httpMethod: "DELETE",
10302
10494
  responses: {
10303
10495
  204: {},
10304
10496
  404: {},
10305
10497
  default: {
10306
- bodyMapper: SearchError$1
10498
+ bodyMapper: SearchError
10307
10499
  }
10308
10500
  },
10309
- queryParameters: [apiVersion$1],
10310
- urlParameters: [endpoint$1, indexName$1],
10501
+ queryParameters: [apiVersion],
10502
+ urlParameters: [endpoint, indexName],
10311
10503
  headerParameters: [
10312
- accept$1,
10313
- xMsClientRequestId$1,
10504
+ accept,
10505
+ xMsClientRequestId,
10314
10506
  ifMatch,
10315
10507
  ifNoneMatch
10316
10508
  ],
10317
- serializer: serializer$5
10509
+ serializer: serializer$2
10318
10510
  };
10319
- const getOperationSpec$5 = {
10511
+ const getOperationSpec$1 = {
10320
10512
  path: "/indexes('{indexName}')",
10321
10513
  httpMethod: "GET",
10322
10514
  responses: {
@@ -10324,13 +10516,13 @@ const getOperationSpec$5 = {
10324
10516
  bodyMapper: SearchIndex
10325
10517
  },
10326
10518
  default: {
10327
- bodyMapper: SearchError$1
10519
+ bodyMapper: SearchError
10328
10520
  }
10329
10521
  },
10330
- queryParameters: [apiVersion$1],
10331
- urlParameters: [endpoint$1, indexName$1],
10332
- headerParameters: [accept$1, xMsClientRequestId$1],
10333
- serializer: serializer$5
10522
+ queryParameters: [apiVersion],
10523
+ urlParameters: [endpoint, indexName],
10524
+ headerParameters: [accept, xMsClientRequestId],
10525
+ serializer: serializer$2
10334
10526
  };
10335
10527
  const getStatisticsOperationSpec = {
10336
10528
  path: "/indexes('{indexName}')/search.stats",
@@ -10340,13 +10532,13 @@ const getStatisticsOperationSpec = {
10340
10532
  bodyMapper: GetIndexStatisticsResult
10341
10533
  },
10342
10534
  default: {
10343
- bodyMapper: SearchError$1
10535
+ bodyMapper: SearchError
10344
10536
  }
10345
10537
  },
10346
- queryParameters: [apiVersion$1],
10347
- urlParameters: [endpoint$1, indexName$1],
10348
- headerParameters: [accept$1, xMsClientRequestId$1],
10349
- serializer: serializer$5
10538
+ queryParameters: [apiVersion],
10539
+ urlParameters: [endpoint, indexName],
10540
+ headerParameters: [accept, xMsClientRequestId],
10541
+ serializer: serializer$2
10350
10542
  };
10351
10543
  const analyzeOperationSpec = {
10352
10544
  path: "/indexes('{indexName}')/search.analyze",
@@ -10356,19 +10548,182 @@ const analyzeOperationSpec = {
10356
10548
  bodyMapper: AnalyzeResult
10357
10549
  },
10358
10550
  default: {
10359
- bodyMapper: SearchError$1
10551
+ bodyMapper: SearchError
10360
10552
  }
10361
10553
  },
10362
10554
  requestBody: request,
10363
- queryParameters: [apiVersion$1],
10364
- urlParameters: [endpoint$1, indexName$1],
10555
+ queryParameters: [apiVersion],
10556
+ urlParameters: [endpoint, indexName],
10365
10557
  headerParameters: [
10366
- contentType$1,
10367
- accept$1,
10368
- xMsClientRequestId$1
10558
+ contentType,
10559
+ accept,
10560
+ xMsClientRequestId
10369
10561
  ],
10370
10562
  mediaType: "json",
10371
- serializer: serializer$5
10563
+ serializer: serializer$2
10564
+ };
10565
+
10566
+ /*
10567
+ * Copyright (c) Microsoft Corporation.
10568
+ * Licensed under the MIT License.
10569
+ *
10570
+ * Code generated by Microsoft (R) AutoRest Code Generator.
10571
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
10572
+ */
10573
+ /** Class containing Aliases operations. */
10574
+ class AliasesImpl {
10575
+ /**
10576
+ * Initialize a new instance of the class Aliases class.
10577
+ * @param client Reference to the service client
10578
+ */
10579
+ constructor(client) {
10580
+ this.client = client;
10581
+ }
10582
+ /**
10583
+ * Creates a new search alias.
10584
+ * @param alias The definition of the alias to create.
10585
+ * @param options The options parameters.
10586
+ */
10587
+ create(alias, options) {
10588
+ return this.client.sendOperationRequest({ alias, options }, createOperationSpec);
10589
+ }
10590
+ /**
10591
+ * Lists all aliases available for a search service.
10592
+ * @param options The options parameters.
10593
+ */
10594
+ list(options) {
10595
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
10596
+ }
10597
+ /**
10598
+ * Creates a new search alias or updates an alias if it already exists.
10599
+ * @param aliasName The definition of the alias to create or update.
10600
+ * @param alias The definition of the alias to create or update.
10601
+ * @param options The options parameters.
10602
+ */
10603
+ createOrUpdate(aliasName, alias, options) {
10604
+ return this.client.sendOperationRequest({ aliasName, alias, options }, createOrUpdateOperationSpec);
10605
+ }
10606
+ /**
10607
+ * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no
10608
+ * recovery option. The mapped index is untouched by this operation.
10609
+ * @param aliasName The name of the alias to delete.
10610
+ * @param options The options parameters.
10611
+ */
10612
+ delete(aliasName, options) {
10613
+ return this.client.sendOperationRequest({ aliasName, options }, deleteOperationSpec);
10614
+ }
10615
+ /**
10616
+ * Retrieves an alias definition.
10617
+ * @param aliasName The name of the alias to retrieve.
10618
+ * @param options The options parameters.
10619
+ */
10620
+ get(aliasName, options) {
10621
+ return this.client.sendOperationRequest({ aliasName, options }, getOperationSpec);
10622
+ }
10623
+ }
10624
+ // Operation Specifications
10625
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10626
+ const createOperationSpec = {
10627
+ path: "/aliases",
10628
+ httpMethod: "POST",
10629
+ responses: {
10630
+ 201: {
10631
+ bodyMapper: SearchAlias
10632
+ },
10633
+ default: {
10634
+ bodyMapper: SearchError
10635
+ }
10636
+ },
10637
+ requestBody: alias,
10638
+ queryParameters: [apiVersion],
10639
+ urlParameters: [endpoint],
10640
+ headerParameters: [
10641
+ contentType,
10642
+ accept,
10643
+ xMsClientRequestId
10644
+ ],
10645
+ mediaType: "json",
10646
+ serializer: serializer$1
10647
+ };
10648
+ const listOperationSpec = {
10649
+ path: "/aliases",
10650
+ httpMethod: "GET",
10651
+ responses: {
10652
+ 200: {
10653
+ bodyMapper: ListAliasesResult
10654
+ },
10655
+ default: {
10656
+ bodyMapper: SearchError
10657
+ }
10658
+ },
10659
+ queryParameters: [apiVersion],
10660
+ urlParameters: [endpoint],
10661
+ headerParameters: [accept, xMsClientRequestId],
10662
+ serializer: serializer$1
10663
+ };
10664
+ const createOrUpdateOperationSpec = {
10665
+ path: "/aliases('{aliasName}')",
10666
+ httpMethod: "PUT",
10667
+ responses: {
10668
+ 200: {
10669
+ bodyMapper: SearchAlias
10670
+ },
10671
+ 201: {
10672
+ bodyMapper: SearchAlias
10673
+ },
10674
+ default: {
10675
+ bodyMapper: SearchError
10676
+ }
10677
+ },
10678
+ requestBody: alias,
10679
+ queryParameters: [apiVersion],
10680
+ urlParameters: [endpoint, aliasName],
10681
+ headerParameters: [
10682
+ contentType,
10683
+ accept,
10684
+ xMsClientRequestId,
10685
+ ifMatch,
10686
+ ifNoneMatch,
10687
+ prefer
10688
+ ],
10689
+ mediaType: "json",
10690
+ serializer: serializer$1
10691
+ };
10692
+ const deleteOperationSpec = {
10693
+ path: "/aliases('{aliasName}')",
10694
+ httpMethod: "DELETE",
10695
+ responses: {
10696
+ 204: {},
10697
+ 404: {},
10698
+ default: {
10699
+ bodyMapper: SearchError
10700
+ }
10701
+ },
10702
+ queryParameters: [apiVersion],
10703
+ urlParameters: [endpoint, aliasName],
10704
+ headerParameters: [
10705
+ accept,
10706
+ xMsClientRequestId,
10707
+ ifMatch,
10708
+ ifNoneMatch
10709
+ ],
10710
+ serializer: serializer$1
10711
+ };
10712
+ const getOperationSpec = {
10713
+ path: "/aliases('{aliasName}')",
10714
+ httpMethod: "GET",
10715
+ responses: {
10716
+ 200: {
10717
+ bodyMapper: SearchAlias
10718
+ },
10719
+ default: {
10720
+ bodyMapper: SearchError
10721
+ }
10722
+ },
10723
+ queryParameters: [apiVersion],
10724
+ urlParameters: [endpoint, aliasName],
10725
+ headerParameters: [accept, xMsClientRequestId],
10726
+ serializer: serializer$1
10372
10727
  };
10373
10728
 
10374
10729
  /*
@@ -10379,14 +10734,15 @@ const analyzeOperationSpec = {
10379
10734
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
10380
10735
  */
10381
10736
  /** @internal */
10382
- class SearchServiceClientContext extends coreClient.ServiceClient {
10737
+ class SearchServiceClient extends coreHttpCompat__namespace.ExtendedServiceClient {
10383
10738
  /**
10384
- * Initializes a new instance of the SearchServiceClientContext class.
10739
+ * Initializes a new instance of the SearchServiceClient class.
10385
10740
  * @param endpoint The endpoint URL of the search service.
10386
10741
  * @param apiVersion Api Version
10387
10742
  * @param options The parameter options
10388
10743
  */
10389
10744
  constructor(endpoint, apiVersion, options) {
10745
+ var _a, _b;
10390
10746
  if (endpoint === undefined) {
10391
10747
  throw new Error("'endpoint' cannot be null");
10392
10748
  }
@@ -10400,42 +10756,23 @@ class SearchServiceClientContext extends coreClient.ServiceClient {
10400
10756
  const defaults = {
10401
10757
  requestContentType: "application/json; charset=utf-8"
10402
10758
  };
10403
- const packageDetails = `azsdk-js-search-documents/11.3.0-beta.5`;
10759
+ const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;
10404
10760
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
10405
10761
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
10406
10762
  : `${packageDetails}`;
10407
10763
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
10408
10764
  userAgentPrefix
10409
- }, baseUri: options.endpoint || "{endpoint}" });
10765
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
10410
10766
  super(optionsWithDefaults);
10411
10767
  // Parameter assignments
10412
10768
  this.endpoint = endpoint;
10413
10769
  this.apiVersion = apiVersion;
10414
- }
10415
- }
10416
-
10417
- /*
10418
- * Copyright (c) Microsoft Corporation.
10419
- * Licensed under the MIT License.
10420
- *
10421
- * Code generated by Microsoft (R) AutoRest Code Generator.
10422
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
10423
- */
10424
- /** @internal */
10425
- class SearchServiceClient extends SearchServiceClientContext {
10426
- /**
10427
- * Initializes a new instance of the SearchServiceClient class.
10428
- * @param endpoint The endpoint URL of the search service.
10429
- * @param apiVersion Api Version
10430
- * @param options The parameter options
10431
- */
10432
- constructor(endpoint, apiVersion, options) {
10433
- super(endpoint, apiVersion, options);
10434
10770
  this.dataSources = new DataSourcesImpl(this);
10435
10771
  this.indexers = new IndexersImpl(this);
10436
10772
  this.skillsets = new SkillsetsImpl(this);
10437
10773
  this.synonymMaps = new SynonymMapsImpl(this);
10438
10774
  this.indexes = new IndexesImpl(this);
10775
+ this.aliases = new AliasesImpl(this);
10439
10776
  }
10440
10777
  /**
10441
10778
  * Gets service level statistics for a search service.
@@ -10446,7 +10783,7 @@ class SearchServiceClient extends SearchServiceClientContext {
10446
10783
  }
10447
10784
  }
10448
10785
  // Operation Specifications
10449
- const serializer$6 = coreClient.createSerializer(Mappers$1, /* isXml */ false);
10786
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
10450
10787
  const getServiceStatisticsOperationSpec = {
10451
10788
  path: "/servicestats",
10452
10789
  httpMethod: "GET",
@@ -10455,13 +10792,13 @@ const getServiceStatisticsOperationSpec = {
10455
10792
  bodyMapper: ServiceStatistics
10456
10793
  },
10457
10794
  default: {
10458
- bodyMapper: SearchError$1
10795
+ bodyMapper: SearchError
10459
10796
  }
10460
10797
  },
10461
- queryParameters: [apiVersion$1],
10462
- urlParameters: [endpoint$1],
10463
- headerParameters: [accept$1, xMsClientRequestId$1],
10464
- serializer: serializer$6
10798
+ queryParameters: [apiVersion],
10799
+ urlParameters: [endpoint],
10800
+ headerParameters: [accept, xMsClientRequestId],
10801
+ serializer
10465
10802
  };
10466
10803
 
10467
10804
  // Copyright (c) Microsoft Corporation.
@@ -10491,7 +10828,12 @@ class SearchIndexClient {
10491
10828
  /**
10492
10829
  * The API version to use when communicating with the service.
10493
10830
  */
10494
- this.apiVersion = "2020-06-30-Preview";
10831
+ this.serviceVersion = defaultServiceVersion;
10832
+ /**
10833
+ * The API version to use when communicating with the service.
10834
+ * @deprecated use {@Link serviceVersion} instead
10835
+ */
10836
+ this.apiVersion = defaultServiceVersion;
10495
10837
  this.endpoint = endpoint;
10496
10838
  this.credential = credential;
10497
10839
  this.options = options;
@@ -10514,20 +10856,30 @@ class SearchIndexClient {
10514
10856
  "OData-MaxVersion",
10515
10857
  "OData-Version",
10516
10858
  "Prefer",
10517
- "throttle-reason"
10518
- ]
10519
- }
10859
+ "throttle-reason",
10860
+ ],
10861
+ },
10520
10862
  });
10521
- let apiVersion = this.apiVersion;
10522
10863
  if (options.apiVersion) {
10523
- if (!["2020-06-30", "2021-04-30-Preview"].includes(options.apiVersion)) {
10864
+ if (!serviceVersions.includes(options.apiVersion)) {
10524
10865
  throw new Error(`Invalid Api Version: ${options.apiVersion}`);
10525
10866
  }
10526
- apiVersion = options.apiVersion;
10867
+ this.serviceVersion = options.apiVersion;
10868
+ this.apiVersion = options.apiVersion;
10527
10869
  }
10528
- this.client = new SearchServiceClient(this.endpoint, apiVersion, internalClientPipelineOptions);
10870
+ if (options.serviceVersion) {
10871
+ if (!serviceVersions.includes(options.serviceVersion)) {
10872
+ throw new Error(`Invalid Service Version: ${options.serviceVersion}`);
10873
+ }
10874
+ this.serviceVersion = options.serviceVersion;
10875
+ this.apiVersion = options.serviceVersion;
10876
+ }
10877
+ this.client = new SearchServiceClient(this.endpoint, this.serviceVersion, internalClientPipelineOptions);
10529
10878
  if (coreAuth.isTokenCredential(credential)) {
10530
- this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: DEFAULT_SEARCH_SCOPE }));
10879
+ const scope = options.audience
10880
+ ? `${options.audience}/.default`
10881
+ : `${exports.KnownSearchAudience.AzurePublicCloud}/.default`;
10882
+ this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: scope }));
10531
10883
  }
10532
10884
  else {
10533
10885
  this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));
@@ -10544,8 +10896,8 @@ class SearchIndexClient {
10544
10896
  }
10545
10897
  catch (e) {
10546
10898
  span.setStatus({
10547
- code: coreTracing.SpanStatusCode.ERROR,
10548
- message: e.message
10899
+ status: "error",
10900
+ error: e.message,
10549
10901
  });
10550
10902
  throw e;
10551
10903
  }
@@ -10587,7 +10939,62 @@ class SearchIndexClient {
10587
10939
  },
10588
10940
  byPage: () => {
10589
10941
  return this.listIndexesPage(options);
10942
+ },
10943
+ };
10944
+ }
10945
+ listAliasesPage(options = {}) {
10946
+ return tslib.__asyncGenerator(this, arguments, function* listAliasesPage_1() {
10947
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-listAliases", options);
10948
+ try {
10949
+ const result = yield tslib.__await(this.client.aliases.list(updatedOptions));
10950
+ yield yield tslib.__await(result.aliases);
10590
10951
  }
10952
+ catch (e) {
10953
+ span.setStatus({
10954
+ status: "error",
10955
+ error: e.message,
10956
+ });
10957
+ throw e;
10958
+ }
10959
+ finally {
10960
+ span.end();
10961
+ }
10962
+ });
10963
+ }
10964
+ listAliasesAll(options = {}) {
10965
+ return tslib.__asyncGenerator(this, arguments, function* listAliasesAll_1() {
10966
+ var e_2, _a;
10967
+ try {
10968
+ for (var _b = tslib.__asyncValues(this.listAliasesPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
10969
+ const page = _c.value;
10970
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
10971
+ }
10972
+ }
10973
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
10974
+ finally {
10975
+ try {
10976
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
10977
+ }
10978
+ finally { if (e_2) throw e_2.error; }
10979
+ }
10980
+ });
10981
+ }
10982
+ /**
10983
+ * Lists all aliases available for a search service.
10984
+ * @param options - The options parameters.
10985
+ */
10986
+ listAliases(options = {}) {
10987
+ const iter = this.listAliasesAll(options);
10988
+ return {
10989
+ next() {
10990
+ return iter.next();
10991
+ },
10992
+ [Symbol.asyncIterator]() {
10993
+ return this;
10994
+ },
10995
+ byPage: () => {
10996
+ return this.listAliasesPage(options);
10997
+ },
10591
10998
  };
10592
10999
  }
10593
11000
  listIndexesNamesPage(options = {}) {
@@ -10600,8 +11007,8 @@ class SearchIndexClient {
10600
11007
  }
10601
11008
  catch (e) {
10602
11009
  span.setStatus({
10603
- code: coreTracing.SpanStatusCode.ERROR,
10604
- message: e.message
11010
+ status: "error",
11011
+ error: e.message,
10605
11012
  });
10606
11013
  throw e;
10607
11014
  }
@@ -10612,19 +11019,19 @@ class SearchIndexClient {
10612
11019
  }
10613
11020
  listIndexesNamesAll(options = {}) {
10614
11021
  return tslib.__asyncGenerator(this, arguments, function* listIndexesNamesAll_1() {
10615
- var e_2, _a;
11022
+ var e_3, _a;
10616
11023
  try {
10617
11024
  for (var _b = tslib.__asyncValues(this.listIndexesNamesPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
10618
11025
  const page = _c.value;
10619
11026
  yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
10620
11027
  }
10621
11028
  }
10622
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
11029
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
10623
11030
  finally {
10624
11031
  try {
10625
11032
  if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
10626
11033
  }
10627
- finally { if (e_2) throw e_2.error; }
11034
+ finally { if (e_3) throw e_3.error; }
10628
11035
  }
10629
11036
  });
10630
11037
  }
@@ -10643,7 +11050,7 @@ class SearchIndexClient {
10643
11050
  },
10644
11051
  byPage: () => {
10645
11052
  return this.listIndexesNamesPage(options);
10646
- }
11053
+ },
10647
11054
  };
10648
11055
  }
10649
11056
  /**
@@ -10658,8 +11065,8 @@ class SearchIndexClient {
10658
11065
  }
10659
11066
  catch (e) {
10660
11067
  span.setStatus({
10661
- code: coreTracing.SpanStatusCode.ERROR,
10662
- message: e.message
11068
+ status: "error",
11069
+ error: e.message,
10663
11070
  });
10664
11071
  throw e;
10665
11072
  }
@@ -10679,8 +11086,8 @@ class SearchIndexClient {
10679
11086
  }
10680
11087
  catch (e) {
10681
11088
  span.setStatus({
10682
- code: coreTracing.SpanStatusCode.ERROR,
10683
- message: e.message
11089
+ status: "error",
11090
+ error: e.message,
10684
11091
  });
10685
11092
  throw e;
10686
11093
  }
@@ -10701,8 +11108,8 @@ class SearchIndexClient {
10701
11108
  }
10702
11109
  catch (e) {
10703
11110
  span.setStatus({
10704
- code: coreTracing.SpanStatusCode.ERROR,
10705
- message: e.message
11111
+ status: "error",
11112
+ error: e.message,
10706
11113
  });
10707
11114
  throw e;
10708
11115
  }
@@ -10723,8 +11130,8 @@ class SearchIndexClient {
10723
11130
  }
10724
11131
  catch (e) {
10725
11132
  span.setStatus({
10726
- code: coreTracing.SpanStatusCode.ERROR,
10727
- message: e.message
11133
+ status: "error",
11134
+ error: e.message,
10728
11135
  });
10729
11136
  throw e;
10730
11137
  }
@@ -10745,8 +11152,8 @@ class SearchIndexClient {
10745
11152
  }
10746
11153
  catch (e) {
10747
11154
  span.setStatus({
10748
- code: coreTracing.SpanStatusCode.ERROR,
10749
- message: e.message
11155
+ status: "error",
11156
+ error: e.message,
10750
11157
  });
10751
11158
  throw e;
10752
11159
  }
@@ -10767,8 +11174,8 @@ class SearchIndexClient {
10767
11174
  }
10768
11175
  catch (e) {
10769
11176
  span.setStatus({
10770
- code: coreTracing.SpanStatusCode.ERROR,
10771
- message: e.message
11177
+ status: "error",
11178
+ error: e.message,
10772
11179
  });
10773
11180
  throw e;
10774
11181
  }
@@ -10790,8 +11197,8 @@ class SearchIndexClient {
10790
11197
  }
10791
11198
  catch (e) {
10792
11199
  span.setStatus({
10793
- code: coreTracing.SpanStatusCode.ERROR,
10794
- message: e.message
11200
+ status: "error",
11201
+ error: e.message,
10795
11202
  });
10796
11203
  throw e;
10797
11204
  }
@@ -10813,8 +11220,8 @@ class SearchIndexClient {
10813
11220
  }
10814
11221
  catch (e) {
10815
11222
  span.setStatus({
10816
- code: coreTracing.SpanStatusCode.ERROR,
10817
- message: e.message
11223
+ status: "error",
11224
+ error: e.message,
10818
11225
  });
10819
11226
  throw e;
10820
11227
  }
@@ -10836,8 +11243,8 @@ class SearchIndexClient {
10836
11243
  }
10837
11244
  catch (e) {
10838
11245
  span.setStatus({
10839
- code: coreTracing.SpanStatusCode.ERROR,
10840
- message: e.message
11246
+ status: "error",
11247
+ error: e.message,
10841
11248
  });
10842
11249
  throw e;
10843
11250
  }
@@ -10863,8 +11270,99 @@ class SearchIndexClient {
10863
11270
  }
10864
11271
  catch (e) {
10865
11272
  span.setStatus({
10866
- code: coreTracing.SpanStatusCode.ERROR,
10867
- message: e.message
11273
+ status: "error",
11274
+ error: e.message,
11275
+ });
11276
+ throw e;
11277
+ }
11278
+ finally {
11279
+ span.end();
11280
+ }
11281
+ }
11282
+ /**
11283
+ * Creates a new search alias or updates an alias if it already exists.
11284
+ * @param alias - The definition of the alias to create or update.
11285
+ * @param options - The options parameters.
11286
+ */
11287
+ async createOrUpdateAlias(alias, options = {}) {
11288
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-createOrUpdateAlias", options);
11289
+ try {
11290
+ const etag = options.onlyIfUnchanged ? alias.etag : undefined;
11291
+ const result = await this.client.aliases.createOrUpdate(alias.name, alias, Object.assign(Object.assign({}, updatedOptions), { ifMatch: etag }));
11292
+ return result;
11293
+ }
11294
+ catch (e) {
11295
+ span.setStatus({
11296
+ status: "error",
11297
+ error: e.message,
11298
+ });
11299
+ throw e;
11300
+ }
11301
+ finally {
11302
+ span.end();
11303
+ }
11304
+ }
11305
+ /**
11306
+ * Creates a new search alias.
11307
+ * @param alias - The definition of the alias to create.
11308
+ * @param options - The options parameters.
11309
+ */
11310
+ async createAlias(alias, options = {}) {
11311
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-createAlias", options);
11312
+ try {
11313
+ const result = await this.client.aliases.create(alias, updatedOptions);
11314
+ return result;
11315
+ }
11316
+ catch (e) {
11317
+ span.setStatus({
11318
+ status: "error",
11319
+ error: e.message,
11320
+ });
11321
+ throw e;
11322
+ }
11323
+ finally {
11324
+ span.end();
11325
+ }
11326
+ }
11327
+ /**
11328
+ * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no
11329
+ * recovery option. The mapped index is untouched by this operation.
11330
+ * @param alias - Alias/Name name of the alias to delete.
11331
+ * @param options - The options parameters.
11332
+ */
11333
+ async deleteAlias(alias, options = {}) {
11334
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-deleteAlias", options);
11335
+ try {
11336
+ const aliasName = typeof alias === "string" ? alias : alias.name;
11337
+ const etag = typeof alias === "string" ? undefined : options.onlyIfUnchanged ? alias.etag : undefined;
11338
+ await this.client.aliases.delete(aliasName, Object.assign(Object.assign({}, updatedOptions), { ifMatch: etag }));
11339
+ }
11340
+ catch (e) {
11341
+ span.setStatus({
11342
+ status: "error",
11343
+ error: e.message,
11344
+ });
11345
+ throw e;
11346
+ }
11347
+ finally {
11348
+ span.end();
11349
+ }
11350
+ }
11351
+ /**
11352
+ * Retrieves an alias definition.
11353
+ * @param aliasName - The name of the alias to retrieve.
11354
+ * @param options - The options parameters.
11355
+ */
11356
+ async getAlias(aliasName, options = {}) {
11357
+ const { span, updatedOptions } = createSpan("SearchIndexerClient-getAlias", options);
11358
+ try {
11359
+ const result = await this.client.aliases.get(aliasName, updatedOptions);
11360
+ return result;
11361
+ }
11362
+ catch (e) {
11363
+ span.setStatus({
11364
+ status: "error",
11365
+ error: e.message,
10868
11366
  });
10869
11367
  throw e;
10870
11368
  }
@@ -10886,8 +11384,8 @@ class SearchIndexClient {
10886
11384
  }
10887
11385
  catch (e) {
10888
11386
  span.setStatus({
10889
- code: coreTracing.SpanStatusCode.ERROR,
10890
- message: e.message
11387
+ status: "error",
11388
+ error: e.message,
10891
11389
  });
10892
11390
  throw e;
10893
11391
  }
@@ -10906,7 +11404,7 @@ class SearchIndexClient {
10906
11404
  const operationOptions = {
10907
11405
  abortSignal,
10908
11406
  requestOptions,
10909
- tracingOptions
11407
+ tracingOptions,
10910
11408
  };
10911
11409
  const { span, updatedOptions } = createSpan("SearchIndexClient-analyzeText", operationOptions);
10912
11410
  try {
@@ -10915,8 +11413,8 @@ class SearchIndexClient {
10915
11413
  }
10916
11414
  catch (e) {
10917
11415
  span.setStatus({
10918
- code: coreTracing.SpanStatusCode.ERROR,
10919
- message: e.message
11416
+ status: "error",
11417
+ error: e.message,
10920
11418
  });
10921
11419
  throw e;
10922
11420
  }
@@ -10936,8 +11434,8 @@ class SearchIndexClient {
10936
11434
  }
10937
11435
  catch (e) {
10938
11436
  span.setStatus({
10939
- code: coreTracing.SpanStatusCode.ERROR,
10940
- message: e.message
11437
+ status: "error",
11438
+ error: e.message,
10941
11439
  });
10942
11440
  throw e;
10943
11441
  }
@@ -10951,7 +11449,7 @@ class SearchIndexClient {
10951
11449
  * @param options - SearchClient Options
10952
11450
  */
10953
11451
  getSearchClient(indexName, options) {
10954
- return new SearchClient$1(this.endpoint, indexName, this.credential, options || this.options);
11452
+ return new SearchClient(this.endpoint, indexName, this.credential, options || this.options);
10955
11453
  }
10956
11454
  }
10957
11455
 
@@ -10982,7 +11480,12 @@ class SearchIndexerClient {
10982
11480
  /**
10983
11481
  * The API version to use when communicating with the service.
10984
11482
  */
10985
- this.apiVersion = "2020-06-30-Preview";
11483
+ this.serviceVersion = defaultServiceVersion;
11484
+ /**
11485
+ * The API version to use when communicating with the service.
11486
+ * @deprecated use {@Link serviceVersion} instead
11487
+ */
11488
+ this.apiVersion = defaultServiceVersion;
10986
11489
  this.endpoint = endpoint;
10987
11490
  const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;
10988
11491
  if (!options.userAgentOptions) {
@@ -11003,20 +11506,30 @@ class SearchIndexerClient {
11003
11506
  "OData-MaxVersion",
11004
11507
  "OData-Version",
11005
11508
  "Prefer",
11006
- "throttle-reason"
11007
- ]
11008
- }
11509
+ "throttle-reason",
11510
+ ],
11511
+ },
11009
11512
  });
11010
- let apiVersion = this.apiVersion;
11011
11513
  if (options.apiVersion) {
11012
- if (!["2020-06-30", "2021-04-30-Preview"].includes(options.apiVersion)) {
11514
+ if (!serviceVersions.includes(options.apiVersion)) {
11013
11515
  throw new Error(`Invalid Api Version: ${options.apiVersion}`);
11014
11516
  }
11015
- apiVersion = options.apiVersion;
11517
+ this.serviceVersion = options.apiVersion;
11518
+ this.apiVersion = options.apiVersion;
11519
+ }
11520
+ if (options.serviceVersion) {
11521
+ if (!serviceVersions.includes(options.serviceVersion)) {
11522
+ throw new Error(`Invalid Service Version: ${options.serviceVersion}`);
11523
+ }
11524
+ this.serviceVersion = options.serviceVersion;
11525
+ this.apiVersion = options.serviceVersion;
11016
11526
  }
11017
- this.client = new SearchServiceClient(this.endpoint, apiVersion, internalClientPipelineOptions);
11527
+ this.client = new SearchServiceClient(this.endpoint, this.serviceVersion, internalClientPipelineOptions);
11018
11528
  if (coreAuth.isTokenCredential(credential)) {
11019
- this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: DEFAULT_SEARCH_SCOPE }));
11529
+ const scope = options.audience
11530
+ ? `${options.audience}/.default`
11531
+ : `${exports.KnownSearchAudience.AzurePublicCloud}/.default`;
11532
+ this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: scope }));
11020
11533
  }
11021
11534
  else {
11022
11535
  this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));
@@ -11035,8 +11548,8 @@ class SearchIndexerClient {
11035
11548
  }
11036
11549
  catch (e) {
11037
11550
  span.setStatus({
11038
- code: coreTracing.SpanStatusCode.ERROR,
11039
- message: e.message
11551
+ status: "error",
11552
+ error: e.message,
11040
11553
  });
11041
11554
  throw e;
11042
11555
  }
@@ -11056,8 +11569,8 @@ class SearchIndexerClient {
11056
11569
  }
11057
11570
  catch (e) {
11058
11571
  span.setStatus({
11059
- code: coreTracing.SpanStatusCode.ERROR,
11060
- message: e.message
11572
+ status: "error",
11573
+ error: e.message,
11061
11574
  });
11062
11575
  throw e;
11063
11576
  }
@@ -11077,8 +11590,8 @@ class SearchIndexerClient {
11077
11590
  }
11078
11591
  catch (e) {
11079
11592
  span.setStatus({
11080
- code: coreTracing.SpanStatusCode.ERROR,
11081
- message: e.message
11593
+ status: "error",
11594
+ error: e.message,
11082
11595
  });
11083
11596
  throw e;
11084
11597
  }
@@ -11098,8 +11611,8 @@ class SearchIndexerClient {
11098
11611
  }
11099
11612
  catch (e) {
11100
11613
  span.setStatus({
11101
- code: coreTracing.SpanStatusCode.ERROR,
11102
- message: e.message
11614
+ status: "error",
11615
+ error: e.message,
11103
11616
  });
11104
11617
  throw e;
11105
11618
  }
@@ -11119,8 +11632,8 @@ class SearchIndexerClient {
11119
11632
  }
11120
11633
  catch (e) {
11121
11634
  span.setStatus({
11122
- code: coreTracing.SpanStatusCode.ERROR,
11123
- message: e.message
11635
+ status: "error",
11636
+ error: e.message,
11124
11637
  });
11125
11638
  throw e;
11126
11639
  }
@@ -11140,8 +11653,8 @@ class SearchIndexerClient {
11140
11653
  }
11141
11654
  catch (e) {
11142
11655
  span.setStatus({
11143
- code: coreTracing.SpanStatusCode.ERROR,
11144
- message: e.message
11656
+ status: "error",
11657
+ error: e.message,
11145
11658
  });
11146
11659
  throw e;
11147
11660
  }
@@ -11162,8 +11675,8 @@ class SearchIndexerClient {
11162
11675
  }
11163
11676
  catch (e) {
11164
11677
  span.setStatus({
11165
- code: coreTracing.SpanStatusCode.ERROR,
11166
- message: e.message
11678
+ status: "error",
11679
+ error: e.message,
11167
11680
  });
11168
11681
  throw e;
11169
11682
  }
@@ -11184,8 +11697,8 @@ class SearchIndexerClient {
11184
11697
  }
11185
11698
  catch (e) {
11186
11699
  span.setStatus({
11187
- code: coreTracing.SpanStatusCode.ERROR,
11188
- message: e.message
11700
+ status: "error",
11701
+ error: e.message,
11189
11702
  });
11190
11703
  throw e;
11191
11704
  }
@@ -11206,8 +11719,8 @@ class SearchIndexerClient {
11206
11719
  }
11207
11720
  catch (e) {
11208
11721
  span.setStatus({
11209
- code: coreTracing.SpanStatusCode.ERROR,
11210
- message: e.message
11722
+ status: "error",
11723
+ error: e.message,
11211
11724
  });
11212
11725
  throw e;
11213
11726
  }
@@ -11228,8 +11741,8 @@ class SearchIndexerClient {
11228
11741
  }
11229
11742
  catch (e) {
11230
11743
  span.setStatus({
11231
- code: coreTracing.SpanStatusCode.ERROR,
11232
- message: e.message
11744
+ status: "error",
11745
+ error: e.message,
11233
11746
  });
11234
11747
  throw e;
11235
11748
  }
@@ -11250,8 +11763,8 @@ class SearchIndexerClient {
11250
11763
  }
11251
11764
  catch (e) {
11252
11765
  span.setStatus({
11253
- code: coreTracing.SpanStatusCode.ERROR,
11254
- message: e.message
11766
+ status: "error",
11767
+ error: e.message,
11255
11768
  });
11256
11769
  throw e;
11257
11770
  }
@@ -11272,8 +11785,8 @@ class SearchIndexerClient {
11272
11785
  }
11273
11786
  catch (e) {
11274
11787
  span.setStatus({
11275
- code: coreTracing.SpanStatusCode.ERROR,
11276
- message: e.message
11788
+ status: "error",
11789
+ error: e.message,
11277
11790
  });
11278
11791
  throw e;
11279
11792
  }
@@ -11295,8 +11808,8 @@ class SearchIndexerClient {
11295
11808
  }
11296
11809
  catch (e) {
11297
11810
  span.setStatus({
11298
- code: coreTracing.SpanStatusCode.ERROR,
11299
- message: e.message
11811
+ status: "error",
11812
+ error: e.message,
11300
11813
  });
11301
11814
  throw e;
11302
11815
  }
@@ -11318,8 +11831,8 @@ class SearchIndexerClient {
11318
11831
  }
11319
11832
  catch (e) {
11320
11833
  span.setStatus({
11321
- code: coreTracing.SpanStatusCode.ERROR,
11322
- message: e.message
11834
+ status: "error",
11835
+ error: e.message,
11323
11836
  });
11324
11837
  throw e;
11325
11838
  }
@@ -11341,8 +11854,8 @@ class SearchIndexerClient {
11341
11854
  }
11342
11855
  catch (e) {
11343
11856
  span.setStatus({
11344
- code: coreTracing.SpanStatusCode.ERROR,
11345
- message: e.message
11857
+ status: "error",
11858
+ error: e.message,
11346
11859
  });
11347
11860
  throw e;
11348
11861
  }
@@ -11368,8 +11881,8 @@ class SearchIndexerClient {
11368
11881
  }
11369
11882
  catch (e) {
11370
11883
  span.setStatus({
11371
- code: coreTracing.SpanStatusCode.ERROR,
11372
- message: e.message
11884
+ status: "error",
11885
+ error: e.message,
11373
11886
  });
11374
11887
  throw e;
11375
11888
  }
@@ -11395,8 +11908,8 @@ class SearchIndexerClient {
11395
11908
  }
11396
11909
  catch (e) {
11397
11910
  span.setStatus({
11398
- code: coreTracing.SpanStatusCode.ERROR,
11399
- message: e.message
11911
+ status: "error",
11912
+ error: e.message,
11400
11913
  });
11401
11914
  throw e;
11402
11915
  }
@@ -11422,8 +11935,8 @@ class SearchIndexerClient {
11422
11935
  }
11423
11936
  catch (e) {
11424
11937
  span.setStatus({
11425
- code: coreTracing.SpanStatusCode.ERROR,
11426
- message: e.message
11938
+ status: "error",
11939
+ error: e.message,
11427
11940
  });
11428
11941
  throw e;
11429
11942
  }
@@ -11444,8 +11957,8 @@ class SearchIndexerClient {
11444
11957
  }
11445
11958
  catch (e) {
11446
11959
  span.setStatus({
11447
- code: coreTracing.SpanStatusCode.ERROR,
11448
- message: e.message
11960
+ status: "error",
11961
+ error: e.message,
11449
11962
  });
11450
11963
  throw e;
11451
11964
  }
@@ -11465,8 +11978,8 @@ class SearchIndexerClient {
11465
11978
  }
11466
11979
  catch (e) {
11467
11980
  span.setStatus({
11468
- code: coreTracing.SpanStatusCode.ERROR,
11469
- message: e.message
11981
+ status: "error",
11982
+ error: e.message,
11470
11983
  });
11471
11984
  throw e;
11472
11985
  }
@@ -11486,8 +11999,8 @@ class SearchIndexerClient {
11486
11999
  }
11487
12000
  catch (e) {
11488
12001
  span.setStatus({
11489
- code: coreTracing.SpanStatusCode.ERROR,
11490
- message: e.message
12002
+ status: "error",
12003
+ error: e.message,
11491
12004
  });
11492
12005
  throw e;
11493
12006
  }
@@ -11505,13 +12018,13 @@ class SearchIndexerClient {
11505
12018
  try {
11506
12019
  await this.client.indexers.resetDocs(indexerName, Object.assign(Object.assign({}, updatedOptions), { keysOrIds: {
11507
12020
  documentKeys: updatedOptions.documentKeys,
11508
- datasourceDocumentIds: updatedOptions.datasourceDocumentIds
12021
+ datasourceDocumentIds: updatedOptions.datasourceDocumentIds,
11509
12022
  } }));
11510
12023
  }
11511
12024
  catch (e) {
11512
12025
  span.setStatus({
11513
- code: coreTracing.SpanStatusCode.ERROR,
11514
- message: e.message
12026
+ status: "error",
12027
+ error: e.message,
11515
12028
  });
11516
12029
  throw e;
11517
12030
  }
@@ -11532,8 +12045,8 @@ class SearchIndexerClient {
11532
12045
  }
11533
12046
  catch (e) {
11534
12047
  span.setStatus({
11535
- code: coreTracing.SpanStatusCode.ERROR,
11536
- message: e.message
12048
+ status: "error",
12049
+ error: e.message,
11537
12050
  });
11538
12051
  throw e;
11539
12052
  }
@@ -11598,11 +12111,13 @@ function odata(strings, ...values) {
11598
12111
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
11599
12112
  */
11600
12113
  /** Known values of {@link ApiVersion20210430Preview} that the service accepts. */
11601
- var KnownApiVersion20210430Preview;
12114
+ var KnownApiVersion20210430Preview$1;
11602
12115
  (function (KnownApiVersion20210430Preview) {
11603
12116
  /** Api Version '2021-04-30-Preview' */
11604
12117
  KnownApiVersion20210430Preview["TwoThousandTwentyOne0430Preview"] = "2021-04-30-Preview";
11605
- })(KnownApiVersion20210430Preview || (KnownApiVersion20210430Preview = {}));
12118
+ })(KnownApiVersion20210430Preview$1 || (KnownApiVersion20210430Preview$1 = {}));
12119
+ /** Known values of {@link QueryLanguage} that the service accepts. */
12120
+ exports.KnownQueryLanguage = void 0;
11606
12121
  (function (KnownQueryLanguage) {
11607
12122
  /** Query language not specified. */
11608
12123
  KnownQueryLanguage["None"] = "none";
@@ -11670,9 +12185,9 @@ var KnownApiVersion20210430Preview;
11670
12185
  KnownQueryLanguage["ArJo"] = "ar-jo";
11671
12186
  /** Query language value for Danish (Denmark). */
11672
12187
  KnownQueryLanguage["DaDk"] = "da-dk";
11673
- /** Query language value for Norwegian (Normway). */
12188
+ /** Query language value for Norwegian (Norway). */
11674
12189
  KnownQueryLanguage["NoNo"] = "no-no";
11675
- /** Query language value for Bulgarian (Bulgary). */
12190
+ /** Query language value for Bulgarian (Bulgaria). */
11676
12191
  KnownQueryLanguage["BgBg"] = "bg-bg";
11677
12192
  /** Query language value for Croatian (Croatia). */
11678
12193
  KnownQueryLanguage["HrHr"] = "hr-hr";
@@ -11749,12 +12264,16 @@ var KnownApiVersion20210430Preview;
11749
12264
  /** Query language value for Urdu (Pakistan). */
11750
12265
  KnownQueryLanguage["UrPk"] = "ur-pk";
11751
12266
  })(exports.KnownQueryLanguage || (exports.KnownQueryLanguage = {}));
12267
+ /** Known values of {@link Speller} that the service accepts. */
12268
+ exports.KnownSpeller = void 0;
11752
12269
  (function (KnownSpeller) {
11753
12270
  /** Speller not enabled. */
11754
12271
  KnownSpeller["None"] = "none";
11755
12272
  /** Speller corrects individual query terms using a static lexicon for the language specified by the queryLanguage parameter. */
11756
12273
  KnownSpeller["Lexicon"] = "lexicon";
11757
12274
  })(exports.KnownSpeller || (exports.KnownSpeller = {}));
12275
+ /** Known values of {@link Answers} that the service accepts. */
12276
+ exports.KnownAnswers = void 0;
11758
12277
  (function (KnownAnswers) {
11759
12278
  /** Do not return answers for the query. */
11760
12279
  KnownAnswers["None"] = "none";
@@ -11769,18 +12288,24 @@ var KnownCaptions;
11769
12288
  /** Extracts captions from the matching documents that contain passages relevant to the search query. */
11770
12289
  KnownCaptions["Extractive"] = "extractive";
11771
12290
  })(KnownCaptions || (KnownCaptions = {}));
12291
+ /** Known values of {@link QuerySpellerType} that the service accepts. */
12292
+ exports.KnownQuerySpellerType = void 0;
11772
12293
  (function (KnownQuerySpellerType) {
11773
12294
  /** Speller not enabled. */
11774
12295
  KnownQuerySpellerType["None"] = "none";
11775
12296
  /** Speller corrects individual query terms using a static lexicon for the language specified by the queryLanguage parameter. */
11776
12297
  KnownQuerySpellerType["Lexicon"] = "lexicon";
11777
12298
  })(exports.KnownQuerySpellerType || (exports.KnownQuerySpellerType = {}));
12299
+ /** Known values of {@link QueryAnswerType} that the service accepts. */
12300
+ exports.KnownQueryAnswerType = void 0;
11778
12301
  (function (KnownQueryAnswerType) {
11779
12302
  /** Do not return answers for the query. */
11780
12303
  KnownQueryAnswerType["None"] = "none";
11781
12304
  /** Extracts answer candidates from the contents of the documents returned in response to a query expressed as a question in natural language. */
11782
12305
  KnownQueryAnswerType["Extractive"] = "extractive";
11783
12306
  })(exports.KnownQueryAnswerType || (exports.KnownQueryAnswerType = {}));
12307
+ /** Known values of {@link QueryCaptionType} that the service accepts. */
12308
+ exports.KnownQueryCaptionType = void 0;
11784
12309
  (function (KnownQueryCaptionType) {
11785
12310
  /** Do not return captions for the query. */
11786
12311
  KnownQueryCaptionType["None"] = "none";
@@ -11796,11 +12321,13 @@ var KnownCaptions;
11796
12321
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
11797
12322
  */
11798
12323
  /** Known values of {@link ApiVersion20210430Preview} that the service accepts. */
11799
- var KnownApiVersion20210430Preview$1;
12324
+ var KnownApiVersion20210430Preview;
11800
12325
  (function (KnownApiVersion20210430Preview) {
11801
12326
  /** Api Version '2021-04-30-Preview' */
11802
12327
  KnownApiVersion20210430Preview["TwoThousandTwentyOne0430Preview"] = "2021-04-30-Preview";
11803
- })(KnownApiVersion20210430Preview$1 || (KnownApiVersion20210430Preview$1 = {}));
12328
+ })(KnownApiVersion20210430Preview || (KnownApiVersion20210430Preview = {}));
12329
+ /** Known values of {@link SearchIndexerDataSourceType} that the service accepts. */
12330
+ exports.KnownSearchIndexerDataSourceType = void 0;
11804
12331
  (function (KnownSearchIndexerDataSourceType) {
11805
12332
  /** Indicates an Azure SQL datasource. */
11806
12333
  KnownSearchIndexerDataSourceType["AzureSql"] = "azuresql";
@@ -11815,6 +12342,8 @@ var KnownApiVersion20210430Preview$1;
11815
12342
  /** Indicates an ADLS Gen2 datasource. */
11816
12343
  KnownSearchIndexerDataSourceType["AdlsGen2"] = "adlsgen2";
11817
12344
  })(exports.KnownSearchIndexerDataSourceType || (exports.KnownSearchIndexerDataSourceType = {}));
12345
+ /** Known values of {@link BlobIndexerParsingMode} that the service accepts. */
12346
+ exports.KnownBlobIndexerParsingMode = void 0;
11818
12347
  (function (KnownBlobIndexerParsingMode) {
11819
12348
  /** Set to default for normal file processing. */
11820
12349
  KnownBlobIndexerParsingMode["Default"] = "default";
@@ -11829,6 +12358,8 @@ var KnownApiVersion20210430Preview$1;
11829
12358
  /** Set to jsonLines to extract individual JSON entities, separated by a new line, as separate documents in Azure Cognitive Search. */
11830
12359
  KnownBlobIndexerParsingMode["JsonLines"] = "jsonLines";
11831
12360
  })(exports.KnownBlobIndexerParsingMode || (exports.KnownBlobIndexerParsingMode = {}));
12361
+ /** Known values of {@link BlobIndexerDataToExtract} that the service accepts. */
12362
+ exports.KnownBlobIndexerDataToExtract = void 0;
11832
12363
  (function (KnownBlobIndexerDataToExtract) {
11833
12364
  /** Indexes just the standard blob properties and user-specified metadata. */
11834
12365
  KnownBlobIndexerDataToExtract["StorageMetadata"] = "storageMetadata";
@@ -11837,6 +12368,8 @@ var KnownApiVersion20210430Preview$1;
11837
12368
  /** Extracts all metadata and textual content from each blob. */
11838
12369
  KnownBlobIndexerDataToExtract["ContentAndMetadata"] = "contentAndMetadata";
11839
12370
  })(exports.KnownBlobIndexerDataToExtract || (exports.KnownBlobIndexerDataToExtract = {}));
12371
+ /** Known values of {@link BlobIndexerImageAction} that the service accepts. */
12372
+ exports.KnownBlobIndexerImageAction = void 0;
11840
12373
  (function (KnownBlobIndexerImageAction) {
11841
12374
  /** Ignores embedded images or image files in the data set. This is the default. */
11842
12375
  KnownBlobIndexerImageAction["None"] = "none";
@@ -11845,6 +12378,8 @@ var KnownApiVersion20210430Preview$1;
11845
12378
  /** Extracts text from images (for example, the word "STOP" from a traffic stop sign), and embeds it into the content field, but treats PDF files differently in that each page will be rendered as an image and normalized accordingly, instead of extracting embedded images. Non-PDF file types will be treated the same as if "generateNormalizedImages" was set. */
11846
12379
  KnownBlobIndexerImageAction["GenerateNormalizedImagePerPage"] = "generateNormalizedImagePerPage";
11847
12380
  })(exports.KnownBlobIndexerImageAction || (exports.KnownBlobIndexerImageAction = {}));
12381
+ /** Known values of {@link BlobIndexerPDFTextRotationAlgorithm} that the service accepts. */
12382
+ exports.KnownBlobIndexerPDFTextRotationAlgorithm = void 0;
11848
12383
  (function (KnownBlobIndexerPDFTextRotationAlgorithm) {
11849
12384
  /** Leverages normal text extraction. This is the default. */
11850
12385
  KnownBlobIndexerPDFTextRotationAlgorithm["None"] = "none";
@@ -11859,10 +12394,14 @@ var KnownIndexerExecutionEnvironment;
11859
12394
  /** Indicates that the indexer should run with the environment provisioned specifically for the search service. This should only be specified as the execution environment if the indexer needs to access resources securely over shared private link resources. */
11860
12395
  KnownIndexerExecutionEnvironment["Private"] = "private";
11861
12396
  })(KnownIndexerExecutionEnvironment || (KnownIndexerExecutionEnvironment = {}));
12397
+ /** Known values of {@link IndexerExecutionStatusDetail} that the service accepts. */
12398
+ exports.KnownIndexerExecutionStatusDetail = void 0;
11862
12399
  (function (KnownIndexerExecutionStatusDetail) {
11863
12400
  /** Indicates that the reset that occurred was for a call to ResetDocs. */
11864
12401
  KnownIndexerExecutionStatusDetail["ResetDocs"] = "resetDocs";
11865
12402
  })(exports.KnownIndexerExecutionStatusDetail || (exports.KnownIndexerExecutionStatusDetail = {}));
12403
+ /** Known values of {@link IndexingMode} that the service accepts. */
12404
+ exports.KnownIndexingMode = void 0;
11866
12405
  (function (KnownIndexingMode) {
11867
12406
  /** The indexer is indexing all documents in the datasource. */
11868
12407
  KnownIndexingMode["IndexingAllDocs"] = "indexingAllDocs";
@@ -11897,6 +12436,8 @@ var KnownSearchFieldDataType;
11897
12436
  KnownSearchFieldDataType["CollectionEdmGeographyPoint"] = "Collection(Edm.GeographyPoint)";
11898
12437
  KnownSearchFieldDataType["CollectionEdmComplexType"] = "Collection(Edm.ComplexType)";
11899
12438
  })(KnownSearchFieldDataType || (KnownSearchFieldDataType = {}));
12439
+ /** Known values of {@link LexicalAnalyzerName} that the service accepts. */
12440
+ exports.KnownLexicalAnalyzerName = void 0;
11900
12441
  (function (KnownLexicalAnalyzerName) {
11901
12442
  /** Microsoft analyzer for Arabic. */
11902
12443
  KnownLexicalAnalyzerName["ArMicrosoft"] = "ar.microsoft";
@@ -12085,6 +12626,8 @@ var KnownSearchFieldDataType;
12085
12626
  /** An analyzer that uses the whitespace tokenizer. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/WhitespaceAnalyzer.html */
12086
12627
  KnownLexicalAnalyzerName["Whitespace"] = "whitespace";
12087
12628
  })(exports.KnownLexicalAnalyzerName || (exports.KnownLexicalAnalyzerName = {}));
12629
+ /** Known values of {@link LexicalNormalizerName} that the service accepts. */
12630
+ exports.KnownLexicalNormalizerName = void 0;
12088
12631
  (function (KnownLexicalNormalizerName) {
12089
12632
  /** Converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if such equivalents exist. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/miscellaneous/ASCIIFoldingFilter.html */
12090
12633
  KnownLexicalNormalizerName["AsciiFolding"] = "asciifolding";
@@ -12097,6 +12640,8 @@ var KnownSearchFieldDataType;
12097
12640
  /** Normalizes token text to uppercase. See https://lucene.apache.org/core/6_6_1/analyzers-common/org/apache/lucene/analysis/core/UpperCaseFilter.html */
12098
12641
  KnownLexicalNormalizerName["Uppercase"] = "uppercase";
12099
12642
  })(exports.KnownLexicalNormalizerName || (exports.KnownLexicalNormalizerName = {}));
12643
+ /** Known values of {@link TokenFilterName} that the service accepts. */
12644
+ exports.KnownTokenFilterName = void 0;
12100
12645
  (function (KnownTokenFilterName) {
12101
12646
  /** A token filter that applies the Arabic normalizer to normalize the orthography. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/ar/ArabicNormalizationFilter.html */
12102
12647
  KnownTokenFilterName["ArabicNormalization"] = "arabic_normalization";
@@ -12167,10 +12712,14 @@ var KnownSearchFieldDataType;
12167
12712
  /** Splits words into subwords and performs optional transformations on subword groups. */
12168
12713
  KnownTokenFilterName["WordDelimiter"] = "word_delimiter";
12169
12714
  })(exports.KnownTokenFilterName || (exports.KnownTokenFilterName = {}));
12715
+ /** Known values of {@link CharFilterName} that the service accepts. */
12716
+ exports.KnownCharFilterName = void 0;
12170
12717
  (function (KnownCharFilterName) {
12171
12718
  /** A character filter that attempts to strip out HTML constructs. See https://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/charfilter/HTMLStripCharFilter.html */
12172
12719
  KnownCharFilterName["HtmlStrip"] = "html_strip";
12173
12720
  })(exports.KnownCharFilterName || (exports.KnownCharFilterName = {}));
12721
+ /** Known values of {@link KeyPhraseExtractionSkillLanguage} that the service accepts. */
12722
+ exports.KnownKeyPhraseExtractionSkillLanguage = void 0;
12174
12723
  (function (KnownKeyPhraseExtractionSkillLanguage) {
12175
12724
  /** Danish */
12176
12725
  KnownKeyPhraseExtractionSkillLanguage["Da"] = "da";
@@ -12205,6 +12754,8 @@ var KnownSearchFieldDataType;
12205
12754
  /** Swedish */
12206
12755
  KnownKeyPhraseExtractionSkillLanguage["Sv"] = "sv";
12207
12756
  })(exports.KnownKeyPhraseExtractionSkillLanguage || (exports.KnownKeyPhraseExtractionSkillLanguage = {}));
12757
+ /** Known values of {@link OcrSkillLanguage} that the service accepts. */
12758
+ exports.KnownOcrSkillLanguage = void 0;
12208
12759
  (function (KnownOcrSkillLanguage) {
12209
12760
  /** Chinese-Simplified */
12210
12761
  KnownOcrSkillLanguage["ZhHans"] = "zh-Hans";
@@ -12258,7 +12809,11 @@ var KnownSearchFieldDataType;
12258
12809
  KnownOcrSkillLanguage["SrLatn"] = "sr-Latn";
12259
12810
  /** Slovak */
12260
12811
  KnownOcrSkillLanguage["Sk"] = "sk";
12812
+ /** Unknown. If the language is explicitly set to "unk", the language will be auto-detected. */
12813
+ KnownOcrSkillLanguage["Unk"] = "unk";
12261
12814
  })(exports.KnownOcrSkillLanguage || (exports.KnownOcrSkillLanguage = {}));
12815
+ /** Known values of {@link LineEnding} that the service accepts. */
12816
+ exports.KnownLineEnding = void 0;
12262
12817
  (function (KnownLineEnding) {
12263
12818
  /** Lines are separated by a single space character. */
12264
12819
  KnownLineEnding["Space"] = "space";
@@ -12269,6 +12824,8 @@ var KnownSearchFieldDataType;
12269
12824
  /** Lines are separated by a carriage return and a line feed ('\r\n') character. */
12270
12825
  KnownLineEnding["CarriageReturnLineFeed"] = "carriageReturnLineFeed";
12271
12826
  })(exports.KnownLineEnding || (exports.KnownLineEnding = {}));
12827
+ /** Known values of {@link ImageAnalysisSkillLanguage} that the service accepts. */
12828
+ exports.KnownImageAnalysisSkillLanguage = void 0;
12272
12829
  (function (KnownImageAnalysisSkillLanguage) {
12273
12830
  /** English */
12274
12831
  KnownImageAnalysisSkillLanguage["En"] = "en";
@@ -12281,6 +12838,8 @@ var KnownSearchFieldDataType;
12281
12838
  /** Chinese */
12282
12839
  KnownImageAnalysisSkillLanguage["Zh"] = "zh";
12283
12840
  })(exports.KnownImageAnalysisSkillLanguage || (exports.KnownImageAnalysisSkillLanguage = {}));
12841
+ /** Known values of {@link VisualFeature} that the service accepts. */
12842
+ exports.KnownVisualFeature = void 0;
12284
12843
  (function (KnownVisualFeature) {
12285
12844
  /** Visual features recognized as adult persons. */
12286
12845
  KnownVisualFeature["Adult"] = "adult";
@@ -12297,12 +12856,16 @@ var KnownSearchFieldDataType;
12297
12856
  /** Tags. */
12298
12857
  KnownVisualFeature["Tags"] = "tags";
12299
12858
  })(exports.KnownVisualFeature || (exports.KnownVisualFeature = {}));
12859
+ /** Known values of {@link ImageDetail} that the service accepts. */
12860
+ exports.KnownImageDetail = void 0;
12300
12861
  (function (KnownImageDetail) {
12301
12862
  /** Details recognized as celebrities. */
12302
12863
  KnownImageDetail["Celebrities"] = "celebrities";
12303
12864
  /** Details recognized as landmarks. */
12304
12865
  KnownImageDetail["Landmarks"] = "landmarks";
12305
12866
  })(exports.KnownImageDetail || (exports.KnownImageDetail = {}));
12867
+ /** Known values of {@link EntityCategory} that the service accepts. */
12868
+ exports.KnownEntityCategory = void 0;
12306
12869
  (function (KnownEntityCategory) {
12307
12870
  /** Entities describing a physical location. */
12308
12871
  KnownEntityCategory["Location"] = "location";
@@ -12319,6 +12882,8 @@ var KnownSearchFieldDataType;
12319
12882
  /** Entities describing an email address. */
12320
12883
  KnownEntityCategory["Email"] = "email";
12321
12884
  })(exports.KnownEntityCategory || (exports.KnownEntityCategory = {}));
12885
+ /** Known values of {@link EntityRecognitionSkillLanguage} that the service accepts. */
12886
+ exports.KnownEntityRecognitionSkillLanguage = void 0;
12322
12887
  (function (KnownEntityRecognitionSkillLanguage) {
12323
12888
  /** Arabic */
12324
12889
  KnownEntityRecognitionSkillLanguage["Ar"] = "ar";
@@ -12367,6 +12932,8 @@ var KnownSearchFieldDataType;
12367
12932
  /** Turkish */
12368
12933
  KnownEntityRecognitionSkillLanguage["Tr"] = "tr";
12369
12934
  })(exports.KnownEntityRecognitionSkillLanguage || (exports.KnownEntityRecognitionSkillLanguage = {}));
12935
+ /** Known values of {@link SentimentSkillLanguage} that the service accepts. */
12936
+ exports.KnownSentimentSkillLanguage = void 0;
12370
12937
  (function (KnownSentimentSkillLanguage) {
12371
12938
  /** Danish */
12372
12939
  KnownSentimentSkillLanguage["Da"] = "da";
@@ -12399,12 +12966,16 @@ var KnownSearchFieldDataType;
12399
12966
  /** Turkish */
12400
12967
  KnownSentimentSkillLanguage["Tr"] = "tr";
12401
12968
  })(exports.KnownSentimentSkillLanguage || (exports.KnownSentimentSkillLanguage = {}));
12969
+ /** Known values of {@link PIIDetectionSkillMaskingMode} that the service accepts. */
12970
+ exports.KnownPIIDetectionSkillMaskingMode = void 0;
12402
12971
  (function (KnownPIIDetectionSkillMaskingMode) {
12403
12972
  /** No masking occurs and the maskedText output will not be returned. */
12404
12973
  KnownPIIDetectionSkillMaskingMode["None"] = "none";
12405
12974
  /** Replaces the detected entities with the character given in the maskingCharacter parameter. The character will be repeated to the length of the detected entity so that the offsets will correctly correspond to both the input text as well as the output maskedText. */
12406
12975
  KnownPIIDetectionSkillMaskingMode["Replace"] = "replace";
12407
12976
  })(exports.KnownPIIDetectionSkillMaskingMode || (exports.KnownPIIDetectionSkillMaskingMode = {}));
12977
+ /** Known values of {@link SplitSkillLanguage} that the service accepts. */
12978
+ exports.KnownSplitSkillLanguage = void 0;
12408
12979
  (function (KnownSplitSkillLanguage) {
12409
12980
  /** Danish */
12410
12981
  KnownSplitSkillLanguage["Da"] = "da";
@@ -12425,12 +12996,16 @@ var KnownSearchFieldDataType;
12425
12996
  /** Portuguese */
12426
12997
  KnownSplitSkillLanguage["Pt"] = "pt";
12427
12998
  })(exports.KnownSplitSkillLanguage || (exports.KnownSplitSkillLanguage = {}));
12999
+ /** Known values of {@link TextSplitMode} that the service accepts. */
13000
+ exports.KnownTextSplitMode = void 0;
12428
13001
  (function (KnownTextSplitMode) {
12429
13002
  /** Split the text into individual pages. */
12430
13003
  KnownTextSplitMode["Pages"] = "pages";
12431
13004
  /** Split the text into individual sentences. */
12432
13005
  KnownTextSplitMode["Sentences"] = "sentences";
12433
13006
  })(exports.KnownTextSplitMode || (exports.KnownTextSplitMode = {}));
13007
+ /** Known values of {@link CustomEntityLookupSkillLanguage} that the service accepts. */
13008
+ exports.KnownCustomEntityLookupSkillLanguage = void 0;
12434
13009
  (function (KnownCustomEntityLookupSkillLanguage) {
12435
13010
  /** Danish */
12436
13011
  KnownCustomEntityLookupSkillLanguage["Da"] = "da";
@@ -12451,6 +13026,8 @@ var KnownSearchFieldDataType;
12451
13026
  /** Portuguese */
12452
13027
  KnownCustomEntityLookupSkillLanguage["Pt"] = "pt";
12453
13028
  })(exports.KnownCustomEntityLookupSkillLanguage || (exports.KnownCustomEntityLookupSkillLanguage = {}));
13029
+ /** Known values of {@link TextTranslationSkillLanguage} that the service accepts. */
13030
+ exports.KnownTextTranslationSkillLanguage = void 0;
12454
13031
  (function (KnownTextTranslationSkillLanguage) {
12455
13032
  /** Afrikaans */
12456
13033
  KnownTextTranslationSkillLanguage["Af"] = "af";
@@ -12627,6 +13204,8 @@ var KnownLexicalTokenizerName;
12627
13204
  /** Divides text at whitespace. See http://lucene.apache.org/core/4_10_3/analyzers-common/org/apache/lucene/analysis/core/WhitespaceTokenizer.html */
12628
13205
  KnownLexicalTokenizerName["Whitespace"] = "whitespace";
12629
13206
  })(KnownLexicalTokenizerName || (KnownLexicalTokenizerName = {}));
13207
+ /** Known values of {@link RegexFlags} that the service accepts. */
13208
+ exports.KnownRegexFlags = void 0;
12630
13209
  (function (KnownRegexFlags) {
12631
13210
  /** Enables canonical equivalence. */
12632
13211
  KnownRegexFlags["CanonEq"] = "CANON_EQ";
@@ -12647,7 +13226,7 @@ var KnownLexicalTokenizerName;
12647
13226
  })(exports.KnownRegexFlags || (exports.KnownRegexFlags = {}));
12648
13227
 
12649
13228
  // Copyright (c) Microsoft Corporation.
12650
- const readFileAsync = util.promisify(fs.readFile);
13229
+ const readFileAsync = util.promisify(fs__namespace.readFile);
12651
13230
  /**
12652
13231
  * Helper method to create a SynonymMap object. This is a NodeJS only method.
12653
13232
  *
@@ -12663,22 +13242,20 @@ async function createSynonymMapFromFile(name, filePath) {
12663
13242
  .filter(Boolean);
12664
13243
  return {
12665
13244
  name,
12666
- synonyms
13245
+ synonyms,
12667
13246
  };
12668
13247
  }
12669
13248
 
12670
13249
  Object.defineProperty(exports, 'AzureKeyCredential', {
12671
13250
  enumerable: true,
12672
- get: function () {
12673
- return coreAuth.AzureKeyCredential;
12674
- }
13251
+ get: function () { return coreAuth.AzureKeyCredential; }
12675
13252
  });
12676
13253
  exports.DEFAULT_BATCH_SIZE = DEFAULT_BATCH_SIZE;
12677
13254
  exports.DEFAULT_FLUSH_WINDOW = DEFAULT_FLUSH_WINDOW;
12678
13255
  exports.DEFAULT_RETRY_COUNT = DEFAULT_RETRY_COUNT;
12679
13256
  exports.GeographyPoint = GeographyPoint;
12680
13257
  exports.IndexDocumentsBatch = IndexDocumentsBatch;
12681
- exports.SearchClient = SearchClient$1;
13258
+ exports.SearchClient = SearchClient;
12682
13259
  exports.SearchIndexClient = SearchIndexClient;
12683
13260
  exports.SearchIndexerClient = SearchIndexerClient;
12684
13261
  exports.SearchIndexingBufferedSender = SearchIndexingBufferedSender;