@azure/search-documents 11.3.0-alpha.20211109.3 → 11.3.0-alpha.20211213.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Release History
2
2
 
3
+ ## 11.3.0-beta.6 (Unreleased)
4
+
5
+ ### Features Added
6
+
7
+ ### Breaking Changes
8
+
9
+ ### Bugs Fixed
10
+
11
+ ### Other Changes
12
+
13
+ - Deprecated `SearchClientOptions.apiVersion` in favor of `SearchClientOptions.serviceVersion`.
14
+ - `apiVersion` will continue to be supported in version 11.x; however, customers are encouraged to migrate to `serviceVersion` instead which is more consistent with the rest of our client libraries.
15
+
3
16
  ## 11.3.0-beta.5 (2021-11-09)
4
17
 
5
18
  ### Features Added
package/dist/index.js CHANGED
@@ -3243,9 +3243,9 @@ class SearchClient$1 {
3243
3243
  /// Maintenance note: when updating supported API versions,
3244
3244
  /// the ContinuationToken logic will need to be updated below.
3245
3245
  /**
3246
- * The API version to use when communicating with the service.
3246
+ * The service version to use when communicating with the service.
3247
3247
  */
3248
- this.apiVersion = "2020-06-30-Preview";
3248
+ this.serviceVersion = "2020-06-30-Preview";
3249
3249
  this.endpoint = endpoint;
3250
3250
  this.indexName = indexName;
3251
3251
  const libInfo = `azsdk-js-search-documents/${SDK_VERSION}`;
@@ -3271,14 +3271,19 @@ class SearchClient$1 {
3271
3271
  ]
3272
3272
  }
3273
3273
  });
3274
- let apiVersion = this.apiVersion;
3275
3274
  if (options.apiVersion) {
3276
3275
  if (!["2020-06-30", "2021-04-30-Preview"].includes(options.apiVersion)) {
3277
3276
  throw new Error(`Invalid Api Version: ${options.apiVersion}`);
3278
3277
  }
3279
- apiVersion = options.apiVersion;
3278
+ this.serviceVersion = options.apiVersion;
3280
3279
  }
3281
- this.client = new SearchClient(this.endpoint, this.indexName, apiVersion, internalClientPipelineOptions);
3280
+ if (options.serviceVersion) {
3281
+ if (!["2020-06-30", "2021-04-30-Preview"].includes(options.serviceVersion)) {
3282
+ throw new Error(`Invalid Service Version: ${options.serviceVersion}`);
3283
+ }
3284
+ this.serviceVersion = options.serviceVersion;
3285
+ }
3286
+ this.client = new SearchClient(this.endpoint, this.indexName, this.serviceVersion, internalClientPipelineOptions);
3282
3287
  if (coreAuth.isTokenCredential(credential)) {
3283
3288
  this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: DEFAULT_SEARCH_SCOPE }));
3284
3289
  }
@@ -3287,6 +3292,13 @@ class SearchClient$1 {
3287
3292
  }
3288
3293
  this.client.pipeline.addPolicy(createOdataMetadataPolicy("none"));
3289
3294
  }
3295
+ /**
3296
+ * The API version to use when communicating with the service.
3297
+ * @deprecated use {@Link serviceVersion} instead
3298
+ */
3299
+ get apiVersion() {
3300
+ return this.serviceVersion;
3301
+ }
3290
3302
  /**
3291
3303
  * Retrieves the number of documents in the index.
3292
3304
  * @param options - Options to the count operation.