@azure/search-documents 11.3.0-alpha.20220321.1 → 11.3.0-alpha.20220407.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/index.js +13 -50
  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.map +1 -1
  9. package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
  10. package/dist-esm/src/generated/data/searchClient.js +31 -3
  11. package/dist-esm/src/generated/data/searchClient.js.map +1 -1
  12. package/dist-esm/src/generated/service/index.js +0 -1
  13. package/dist-esm/src/generated/service/index.js.map +1 -1
  14. package/dist-esm/src/generated/service/models/index.js.map +1 -1
  15. package/dist-esm/src/generated/service/operations/aliases.js.map +1 -1
  16. package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
  17. package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
  18. package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
  19. package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
  20. package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
  21. package/dist-esm/src/generated/service/searchServiceClient.js +27 -3
  22. package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
  23. package/dist-esm/src/searchClient.js.map +1 -1
  24. package/dist-esm/src/searchIndexClient.js.map +1 -1
  25. package/dist-esm/src/searchIndexerClient.js.map +1 -1
  26. package/package.json +2 -1
  27. package/types/search-documents.d.ts +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History
2
2
 
3
+ ## 11.3.0-beta.8 (unreleased)
4
+
5
+ Added `core-http-compat` dependency
6
+
3
7
  ## 11.3.0-beta.7 (2022-03-08)
4
8
 
5
9
  ### Features Added
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib = require('tslib');
6
6
  var coreRestPipeline = require('@azure/core-rest-pipeline');
7
+ var coreHttpCompat = require('@azure/core-http-compat');
7
8
  var coreClient = require('@azure/core-client');
8
9
  var coreAuth = require('@azure/core-auth');
9
10
  var logger$1 = require('@azure/logger');
@@ -32,6 +33,7 @@ function _interopNamespace(e) {
32
33
  return Object.freeze(n);
33
34
  }
34
35
 
36
+ var coreHttpCompat__namespace = /*#__PURE__*/_interopNamespace(coreHttpCompat);
35
37
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
36
38
  var EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
37
39
  var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
@@ -1731,15 +1733,16 @@ const autocompletePostOperationSpec = {
1731
1733
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1732
1734
  */
1733
1735
  /** @internal */
1734
- class SearchClientContext extends coreClient__namespace.ServiceClient {
1736
+ class SearchClient$1 extends coreHttpCompat__namespace.ExtendedServiceClient {
1735
1737
  /**
1736
- * Initializes a new instance of the SearchClientContext class.
1738
+ * Initializes a new instance of the SearchClient class.
1737
1739
  * @param endpoint The endpoint URL of the search service.
1738
1740
  * @param indexName The name of the index.
1739
1741
  * @param apiVersion Api Version
1740
1742
  * @param options The parameter options
1741
1743
  */
1742
1744
  constructor(endpoint, indexName, apiVersion, options) {
1745
+ var _a, _b;
1743
1746
  if (endpoint === undefined) {
1744
1747
  throw new Error("'endpoint' cannot be null");
1745
1748
  }
@@ -1756,39 +1759,18 @@ class SearchClientContext extends coreClient__namespace.ServiceClient {
1756
1759
  const defaults = {
1757
1760
  requestContentType: "application/json; charset=utf-8"
1758
1761
  };
1759
- const packageDetails = `azsdk-js-search-documents/11.3.0-beta.7`;
1762
+ const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;
1760
1763
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1761
1764
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1762
1765
  : `${packageDetails}`;
1763
1766
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1764
1767
  userAgentPrefix
1765
- }, 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}')" });
1766
1769
  super(optionsWithDefaults);
1767
1770
  // Parameter assignments
1768
1771
  this.endpoint = endpoint;
1769
1772
  this.indexName = indexName;
1770
1773
  this.apiVersion = apiVersion;
1771
- }
1772
- }
1773
-
1774
- /*
1775
- * Copyright (c) Microsoft Corporation.
1776
- * Licensed under the MIT License.
1777
- *
1778
- * Code generated by Microsoft (R) AutoRest Code Generator.
1779
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1780
- */
1781
- /** @internal */
1782
- class SearchClient$1 extends SearchClientContext {
1783
- /**
1784
- * Initializes a new instance of the SearchClient class.
1785
- * @param endpoint The endpoint URL of the search service.
1786
- * @param indexName The name of the index.
1787
- * @param apiVersion Api Version
1788
- * @param options The parameter options
1789
- */
1790
- constructor(endpoint, indexName, apiVersion, options) {
1791
- super(endpoint, indexName, apiVersion, options);
1792
1774
  this.documents = new DocumentsImpl(this);
1793
1775
  }
1794
1776
  }
@@ -1815,7 +1797,7 @@ function createSearchApiKeyCredentialPolicy(credential) {
1815
1797
 
1816
1798
  // Copyright (c) Microsoft Corporation.
1817
1799
  // Licensed under the MIT license.
1818
- const SDK_VERSION = "11.3.0-beta.7";
1800
+ const SDK_VERSION = "11.3.0-beta.8";
1819
1801
 
1820
1802
  // Copyright (c) Microsoft Corporation.
1821
1803
  /**
@@ -10728,14 +10710,15 @@ const getOperationSpec = {
10728
10710
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
10729
10711
  */
10730
10712
  /** @internal */
10731
- class SearchServiceClientContext extends coreClient__namespace.ServiceClient {
10713
+ class SearchServiceClient extends coreHttpCompat__namespace.ExtendedServiceClient {
10732
10714
  /**
10733
- * Initializes a new instance of the SearchServiceClientContext class.
10715
+ * Initializes a new instance of the SearchServiceClient class.
10734
10716
  * @param endpoint The endpoint URL of the search service.
10735
10717
  * @param apiVersion Api Version
10736
10718
  * @param options The parameter options
10737
10719
  */
10738
10720
  constructor(endpoint, apiVersion, options) {
10721
+ var _a, _b;
10739
10722
  if (endpoint === undefined) {
10740
10723
  throw new Error("'endpoint' cannot be null");
10741
10724
  }
@@ -10749,37 +10732,17 @@ class SearchServiceClientContext extends coreClient__namespace.ServiceClient {
10749
10732
  const defaults = {
10750
10733
  requestContentType: "application/json; charset=utf-8"
10751
10734
  };
10752
- const packageDetails = `azsdk-js-search-documents/11.3.0-beta.7`;
10735
+ const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;
10753
10736
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
10754
10737
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
10755
10738
  : `${packageDetails}`;
10756
10739
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
10757
10740
  userAgentPrefix
10758
- }, baseUri: options.endpoint || "{endpoint}" });
10741
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
10759
10742
  super(optionsWithDefaults);
10760
10743
  // Parameter assignments
10761
10744
  this.endpoint = endpoint;
10762
10745
  this.apiVersion = apiVersion;
10763
- }
10764
- }
10765
-
10766
- /*
10767
- * Copyright (c) Microsoft Corporation.
10768
- * Licensed under the MIT License.
10769
- *
10770
- * Code generated by Microsoft (R) AutoRest Code Generator.
10771
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
10772
- */
10773
- /** @internal */
10774
- class SearchServiceClient extends SearchServiceClientContext {
10775
- /**
10776
- * Initializes a new instance of the SearchServiceClient class.
10777
- * @param endpoint The endpoint URL of the search service.
10778
- * @param apiVersion Api Version
10779
- * @param options The parameter options
10780
- */
10781
- constructor(endpoint, apiVersion, options) {
10782
- super(endpoint, apiVersion, options);
10783
10746
  this.dataSources = new DataSourcesImpl(this);
10784
10747
  this.indexers = new IndexersImpl(this);
10785
10748
  this.skillsets = new SkillsetsImpl(this);